Fix: On wasm targets, call panic_in_cleanup if panic occurs in cleanup#155249
Fix: On wasm targets, call panic_in_cleanup if panic occurs in cleanup#155249hoodmane wants to merge 1 commit intorust-lang:mainfrom
panic_in_cleanup if panic occurs in cleanup#155249Conversation
|
Some changes occurred in compiler/rustc_codegen_gcc |
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
r? @bjorn3 |
|
@rustbot blocked LLVM backport and rustc LLVM update need to land first. |
Update LLVM to 22.1.4 Unlocks #155249. I made a new branch that removes CI checks for macOS and reverts rust-lang/llvm-project@24b53fb.
Update LLVM to 22.1.4 Unlocks #155249. I made a new branch that removes CI checks for macOS and reverts rust-lang/llvm-project@24b53fb.
This comment has been minimized.
This comment has been minimized.
Update LLVM to 22.1.4 Unlocks rust-lang/rust#155249. I made a new branch that removes CI checks for macOS and reverts rust-lang/llvm-project@24b53fb.
Update LLVM to 22.1.4 Unlocks rust-lang/rust#155249. I made a new branch that removes CI checks for macOS and reverts rust-lang/llvm-project@24b53fb.
This comment has been minimized.
This comment has been minimized.
|
@bors author The backport has happened. |
|
Unknown command "author". Run |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
Previously this was not correctly implemented. Each funclet may need its own terminate block, so this changes the `terminate_block` into a `terminate_blocks` `IndexVec` which can have a terminate_block for each funclet. We key on the first basic block of the funclet -- in particular, this is the start block for the old case of the top level terminate function. Rather than using a catchswitch/catchpad pair, I used a cleanuppad. The reason for the pair is to avoid catching foreign exceptions on MSVC. On wasm, it seems that the catchswitch/catchpad pair is optimized back into a single cleanuppad and a catch_all instruction is emitted which will catch foreign exceptions. Because the new logic is only used on wasm, it seemed better to take the simpler approach seeing as they do the same thing.
9664e4c to
b072d24
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready |
Relies on rust-lang/llvm-project#194.
Reland of #151771.
Previously this was not correctly implemented. Each funclet may need its own terminate block, so this changes the
terminate_blockinto aterminate_blocksIndexVecwhich can have a terminate_block for each funclet. We key on the first basic block of the funclet -- in particular, this is the start block for the old case of the top level terminate function.Rather than using a catchswitch/catchpad pair, I used a cleanuppad. The reason for the pair is to avoid catching foreign exceptions on MSVC. On wasm, it seems that the catchswitch/catchpad pair is optimized back into a single cleanuppad and a catch_all instruction is emitted which will catch foreign exceptions. Because the new logic is only used on wasm, it seemed better to take the simpler approach seeing as they do the same thing.