-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add a workaround for catch_unwind in stage1 mingw target #70010
Conversation
@bors r+ p=1 (fixes tests on stage 1 for mingw) |
📌 Commit 864d05b has been approved by |
⌛ Testing commit 864d05b with merge 0239cd80e7c23dc6235358a121253894cd91077d... |
💥 Test timed out |
@bors retry |
// Compatibility wrapper around the try intrinsic for bootstrap. | ||
// | ||
// We also need to mark it #[inline(never)] to work around a bug on MinGW | ||
// targets: the unwinding implementation was relying on UB, but this only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there at least a brief explanation somewhere of what the UB is that it was relying on? I could not find that here nor in #70001.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically we were replacing LLVM's resume
instruction with calls to rust_eh_unwind_resume
(which then forwards to _Unwind_Resume
), but it turns out that LLVM actually needs to make certain code transformations on landing pads which weren't being done since we were not using the proper resume
instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
☀️ Test successful - checks-azure |
Fixes #70001
cc @petrochenkov
r? @Mark-Simulacrum