Add a workaround for catch_unwind in stage1 mingw target#70010
Add a workaround for catch_unwind in stage1 mingw target#70010bors merged 1 commit intorust-lang:masterfrom
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.
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.
There was a problem hiding this comment.
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.
|
☀️ Test successful - checks-azure |
Fixes #70001
cc @petrochenkov
r? @Mark-Simulacrum