-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGTRAP during compilation on MacOS #129887
Comments
@DianQK As this is on M2, can you please take a look? |
Reduced: target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "arm64-apple-macosx11.0.0"
define void @"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h482f4bde4fc3470aE"(ptr %0, i64 %1, i64 %2) personality ptr null {
br label %4
4: ; preds = %"_ZN4core4iter8adapters3map8map_fold28_$u7b$$u7b$closure$u7d$$u7d$17he00eb30a769dd1bfE.exit", %3
%5 = phi i64 [ %spec.select.i2.i.i, %"_ZN4core4iter8adapters3map8map_fold28_$u7b$$u7b$closure$u7d$$u7d$17he00eb30a769dd1bfE.exit" ], [ 0, %3 ]
%spec.select.i.i.i1 = phi i64 [ %spec.select.i.i.i, %"_ZN4core4iter8adapters3map8map_fold28_$u7b$$u7b$closure$u7d$$u7d$17he00eb30a769dd1bfE.exit" ], [ 0, %3 ]
%6 = invoke ptr null(ptr null, ptr null)
to label %"_ZN4core4iter8adapters3map8map_fold28_$u7b$$u7b$closure$u7d$$u7d$17he00eb30a769dd1bfE.exit" unwind label %7
7: ; preds = %4
%8 = landingpad { ptr, i32 }
cleanup
%9 = getelementptr i8, ptr %0, i64 48
%10 = getelementptr i8, ptr %0, i64 40
store i64 %spec.select.i.i.i1, ptr %10, align 8
store i64 %5, ptr %9, align 8
resume { ptr, i32 } zeroinitializer
"_ZN4core4iter8adapters3map8map_fold28_$u7b$$u7b$closure$u7d$$u7d$17he00eb30a769dd1bfE.exit": ; preds = %4
%trunc.i.i.i = trunc i64 %1 to i1
%spec.select.i.i.i = select i1 %trunc.i.i.i, i64 40, i64 0
%trunc.i1.i.i = trunc i64 %5 to i1
%spec.select.i2.i.i = select i1 %trunc.i1.i.i, i64 0, i64 %2
br label %4
} https://llvm.godbolt.org/z/P58q1ozsP If this reduction is too aggressive, I'll try again tomorrow. :) |
Upstream issue: llvm/llvm-project#107036. |
Fixed in LLVM 19 (Probably the next backport). |
Even though this is basically-already-fixed, we need to figure out if this is on the 1.82 beta (it has to be, right?) |
Wait, I can just do math. Yes, it is. |
I cannot reproduce this because this requires the nightly version, but the regression has included in 1.82 beta.
I would expect to integrate the final 19.1.0 version of LLVM to rustc 1.82, although this contains many changes. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-high |
Yeah, we'll backport at least the 19.1.0 release to the beta branch, possibly also a later point release if needed. |
It's not super important but the regression looks to be from #128371. |
then reverting that PR is also an option, but I will of course defer to you on exactly what gets backported, just wanted to make sure this was tagged appropriately so we didn't lose track. :^) |
Update LLVM to 19 327ca6c Fixes rust-lang#129887. r? nikic
Unfortunately I don't have a minimal reproducible example, just a reproducible example. On MacOS Ventura 13.5 on an Apple M2 processor, the following steps reproduce it:
git clone https://github.com/pola-rs/polars --depth 1 cd polars make build-opt
Said steps cause
rustc
to exit with a SIGTRAP signal, unfortunately all the way at the end of compilation.Meta
The above SIGTRAP is a regression, it occurs with
channel = "nightly-2024-09-02"
inrust-toolchain.toml
, as well as withnightly-2024-08-26
, but not withnightly-2024-07-26
. I have not bisected it further.The error does not occur when using
make build
instead ofmake build-opt
. The difference between these two is the profile selected,make build
uses the debug profile whereasbuilt-opt
uses the following profile:Error output
I've tagged this issue as an 'internal compiler error', even though it does not panic but actually SIGTRAPs. I thus don't have a Rust backtrace, but I did attach
lldb
torustc
before the sigtrap occurred and got the following backtrace:Backtrace
The text was updated successfully, but these errors were encountered: