-
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
UI test issue-64655-extern-rust-must-allow-unwind.rs#fat0 triggers LLVM assert when compiled for i686 target #86758
Comments
Normally, we would get the LLVM error message "ran out of registers during register allocation" here. However, Rust's LLVM diagnostic handler does not emit diagnostics immediately - it queues them up for the main thread to handle. As a result, we hit the assertion before the main thread has a change to print the diagnostic. Bug https://bugs.llvm.org/show_bug.cgi?id=42569 looks potentially related |
I've reduced this to a 5 megabyte LLVM IR file. Unfortunatey, The crash can be reproduced by unzipping |
Using target triple = "i686-unknown-linux-gnu"
define void @my_fn() personality i32 undef {
invoke void undef()
to label %6 unwind label %3
1:
%2 = icmp eq i8 %4, 0
ret void
3:
%4 = phi i8 [ 0, %0 ], [ 1, %6 ]
%5 = landingpad { i8*, i32 }
cleanup
br label %1
6:
invoke fastcc void undef(i32 undef)
to label %7 unwind label %3
7:
ret void
} |
This appears to be fixed in the latest LLVM trunk: https://godbolt.org/z/h96n5WqeG |
I don't see a declaration of |
I bisected the LLVM fix to llvm/llvm-project@c1dc2672 |
It might end up being easier to just wait for the LLVM 13 bump in #87570 |
@bjorn3 - |
The LLVM fix was backported in #87610, so this issue should be fixed. |
This was discovered in #81825 (comment), which adds support for Linux pidfds to standard library. With the changes in the PR, the
issue-64655-extern-rust-must-allow-unwind
test triggers an LLVM assertion during compilation. This is similar to the issue described in #83854.As a workaround, the failing test revision was disabled provisionally.
Minimal reproduction:
src/ci/docker/run.sh --dev i686-gnu
and buildstage1
compilerecho "fn main() {}" | build/i686-unknown-linux-gnu/stage1/bin/rustc - "--target=i686-unknown-linux-gnu" -Clto=fat
Output:
The text was updated successfully, but these errors were encountered: