-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ScalarReplacementOfAggregates causes rustc to emit invalid LLVM debuginfo (and sometimes rustc segfaults) #115113
Comments
Since I'm the one with the "wild" bugzilla, I do plan to apply such a patch when I update to 1.72 in Fedora. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-critical |
I can reproduce this building release cargo with debuginfo:
That's 1.72.0 from the dev-static pre-release build. It also reproduces with |
That also does trip with LLVM assertions:
|
Turn off the MIR SROA optimization by default to prevent incorrect debuginfo generation and rustc ICEs caused by invalid LLVM IR being created. Related to rust-lang#115113
…iper Disable MIR SROA optimization by default Turn off the MIR SROA optimization by default to prevent incorrect debuginfo generation and rustc ICEs caused by invalid LLVM IR being created. Related to rust-lang#115113 r? `@cuviper` cc `@saethlin`
Since #115140 just landed on stable for 1.72, I'm moving this to the 1.73 milestone. |
Reopening until we solve 1.73-beta too. |
Hmm, the backport did merge, but I guess this didn't auto-close because the PR wasn't to master? |
https://rust.godbolt.org/z/9YvvvcMKj
Compiled with
Becomes this:
ScalarReplacementOfAggregates is on by default in the stable toolchain that is currently being released, and it was turned on in #112002. There is an LLVM assertion which can catch some manifestations of this problem, but in the wild it seems rather hard to actually hit the assertion.
To the best of my knowledge https://bugzilla.redhat.com/show_bug.cgi?id=2226564 is the closest we have to someone hitting this in the wild. I hit it on my own by using
-Cdebuginfo=2 -Zinline-mir-threshold=1000 -Zinline-mir-hint-threshold=1000
with-Zbuild-std
.If this becomes a problem when 1.72 goes out, an emergency fix would be just reverting the change to
is_enabled
in the linked PR.The text was updated successfully, but these errors were encountered: