about summary refs log tree commit diff
path: root/library/panic_unwind/src/emcc.rs
AgeCommit message (Collapse)AuthorLines
2022-10-23Fix alloc sizeGary Guo-2/+1
2022-10-23Implement Rust foreign exception protection for EMCC and SEHGary Guo-10/+27
2022-08-23Move personality functions to stdAmanieu d'Antras-16/+0
These were previously in the panic_unwind crate with dummy stubs in the panic_abort crate. However it turns out that this is insufficient: we still need a proper personality function even with -C panic=abort to handle the following cases: 1) `extern "C-unwind"` still needs to catch foreign exceptions with -C panic=abort to turn them into aborts. This requires landing pads and a personality function. 2) ARM EHABI uses the personality function when creating backtraces. The dummy personality function in panic_abort was causing backtrace generation to get stuck in a loop since the personality function is responsible for advancing the unwind state to the next frame.
2022-06-09Add underscores to rust_eh_personality arguments to mark them as unusedHood Chatham-5/+5
2022-06-08Remove __gxx_personality_v0 declarationHood Chatham-7/+0
2022-06-08Fix formatterHood Chatham-1/+0
2022-06-08Don't use __gxx_personality_v0 in panic_unwind on emscripten targetHood Chatham-1/+6
This resolves #85821. See also the discussion here: https://github.com/emscripten-core/emscripten/issues/17128 The consensus seems to be that rust_eh_personality is never invoked. I patched __gxx_personality_v0 to log invocations and then ran various panic tests and it was never called, so this analysis matches what seems to happen in practice. This replaces the definition with an abort, modeled on the structured exception handling implementation.
2021-12-14Fix a bunch of typosFrank Steffahn-1/+1
2020-08-27Abort when catch_unwind catches a foreign exceptionAmanieu d'Antras-16/+30
2020-07-27mv std libs to library/mark-0/+121