Uh oh!
There was an error while loading. Please reload this page.
Fix: On wasm targets, call panic_in_cleanup if panic occurs in cleanup - #155249
Conversation
rustbot
commented
Apr 13, 2026
Some changes occurred in compiler/rustc_codegen_gcc |
rustbot
commented
Apr 13, 2026
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.
hoodmane
commented
Apr 13, 2026
r? @bjorn3 |
bjorn3
commented
Apr 13, 2026
@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.
mati865
commented
Apr 28, 2026
@bors author The backport has happened. |
Unknown command "author". Run |
mati865
commented
Apr 28, 2026
@rustbot author |
rustbot
commented
Apr 28, 2026
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
b072d24Comparerustbot
commented
Apr 28, 2026
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. |
hoodmane
commented
Apr 28, 2026
@rustbot ready |
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.
bjorn3
commented
Apr 30, 2026
@bors r+ |
…and, r=bjorn3 Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup Relies on rust-lang/llvm-project#194. Reland of rust-lang#151771. 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. - [ ] Add test for rust-lang#153948
…uwer Rollup of 13 pull requests Successful merges: - #155249 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - #155853 (Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets) - #155919 (simplify `ast_fragments!`) - #155939 (Add feature gate for view_types experiment) - #155974 (add `c_variadic_experimental_arch` feature) - #155991 (Catch unwinds from the global ctxt callback to complete queries profiling data in more cases) - #156003 (Pass Session to optimize_and_codegen_fat_lto) - #153566 (Add suggestion for E0401 on inner const items) - #154610 (Suggest public re-exports when a private module makes an import path inaccessible) - #155523 (Reorganize `tests/ui/issues/` - 02) - #155980 (Move `feature*` methods from `parse` mod to `errors` mod.) - #155987 (Make lifting infallible) - #155988 (tests/run-make/print-cfg: add Android target_env case)
Rollup of 19 pull requests Successful merges: - #155237 (Disentangle AST crates and error crates) - #155249 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - #155853 (Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets) - #155919 (simplify `ast_fragments!`) - #155939 (Add feature gate for view_types experiment) - #155954 (rustdoc: preserve parent doc cfg for `macro_export` macros) - #155974 (add `c_variadic_experimental_arch` feature) - #155991 (Catch unwinds from the global ctxt callback to complete queries profiling data in more cases) - #156003 (Pass Session to optimize_and_codegen_fat_lto) - #153566 (Add suggestion for E0401 on inner const items) - #154610 (Suggest public re-exports when a private module makes an import path inaccessible) - #155523 (Reorganize `tests/ui/issues/` - 02) - #155821 (c-variadic: document `Clone` and `Drop` instances and require `VaArgSafe: Copy`) - #155980 (Move `feature*` methods from `parse` mod to `errors` mod.) - #155987 (Make lifting infallible) - #155988 (tests/run-make/print-cfg: add Android target_env case) - #156000 (Fix ICE when using -Zinstrument-mcount and -Clinker-flavor=lld) - #156002 (Allow to use `Diagnostic` directly in `SharedContext::emit_lint`) - #156015 (rustc-dev-guide subtree update)
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #155249 - hoodmane:wasm-panic-in-cleanup-reland, r=bjorn3 Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup 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_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. - [ ] Add test for #153948
Rollup of 19 pull requests Successful merges: - rust-lang/rust#155237 (Disentangle AST crates and error crates) - rust-lang/rust#155249 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - rust-lang/rust#155853 (Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets) - rust-lang/rust#155919 (simplify `ast_fragments!`) - rust-lang/rust#155939 (Add feature gate for view_types experiment) - rust-lang/rust#155954 (rustdoc: preserve parent doc cfg for `macro_export` macros) - rust-lang/rust#155974 (add `c_variadic_experimental_arch` feature) - rust-lang/rust#155991 (Catch unwinds from the global ctxt callback to complete queries profiling data in more cases) - rust-lang/rust#156003 (Pass Session to optimize_and_codegen_fat_lto) - rust-lang/rust#153566 (Add suggestion for E0401 on inner const items) - rust-lang/rust#154610 (Suggest public re-exports when a private module makes an import path inaccessible) - rust-lang/rust#155523 (Reorganize `tests/ui/issues/` - 02) - rust-lang/rust#155821 (c-variadic: document `Clone` and `Drop` instances and require `VaArgSafe: Copy`) - rust-lang/rust#155980 (Move `feature*` methods from `parse` mod to `errors` mod.) - rust-lang/rust#155987 (Make lifting infallible) - rust-lang/rust#155988 (tests/run-make/print-cfg: add Android target_env case) - rust-lang/rust#156000 (Fix ICE when using -Zinstrument-mcount and -Clinker-flavor=lld) - rust-lang/rust#156002 (Allow to use `Diagnostic` directly in `SharedContext::emit_lint`) - rust-lang/rust#156015 (rustc-dev-guide subtree update)
…orn3 Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup 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_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. - [ ] Add test for #153948
Rollup of 19 pull requests Successful merges: - rust-lang/rust#155237 (Disentangle AST crates and error crates) - rust-lang/rust#155249 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - rust-lang/rust#155853 (Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets) - rust-lang/rust#155919 (simplify `ast_fragments!`) - rust-lang/rust#155939 (Add feature gate for view_types experiment) - rust-lang/rust#155954 (rustdoc: preserve parent doc cfg for `macro_export` macros) - rust-lang/rust#155974 (add `c_variadic_experimental_arch` feature) - rust-lang/rust#155991 (Catch unwinds from the global ctxt callback to complete queries profiling data in more cases) - rust-lang/rust#156003 (Pass Session to optimize_and_codegen_fat_lto) - rust-lang/rust#153566 (Add suggestion for E0401 on inner const items) - rust-lang/rust#154610 (Suggest public re-exports when a private module makes an import path inaccessible) - rust-lang/rust#155523 (Reorganize `tests/ui/issues/` - 02) - rust-lang/rust#155821 (c-variadic: document `Clone` and `Drop` instances and require `VaArgSafe: Copy`) - rust-lang/rust#155980 (Move `feature*` methods from `parse` mod to `errors` mod.) - rust-lang/rust#155987 (Make lifting infallible) - rust-lang/rust#155988 (tests/run-make/print-cfg: add Android target_env case) - rust-lang/rust#156000 (Fix ICE when using -Zinstrument-mcount and -Clinker-flavor=lld) - rust-lang/rust#156002 (Allow to use `Diagnostic` directly in `SharedContext::emit_lint`) - rust-lang/rust#156015 (rustc-dev-guide subtree update)
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.