about summary refs log tree commit diff
path: root/library/panic_unwind/src/emcc.rs
AgeCommit message (Collapse)AuthorLines
2025-03-06library: Use size_of from the prelude instead of importedThalia Archibald-2/+2
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
2025-02-14panic_unwind: Apply unsafe_op_in_unsafe_fnEric Huss-28/+32
2025-02-10Rollup merge of #136705 - compiler-errors:edition-library, r=jhprattJubilee-2/+2
Some miscellaneous edition-related library tweaks Some library edition tweaks that can be done separately from upgrading the whole standard library to edition 2024 (which is blocked on getting the submodules upgraded, for example)
2025-02-09Mark extern blocks as unsafeMichael Goulet-2/+2
2025-02-08Rustfmtbjorn3-5/+8
2025-01-20panic_unwind: add `#![warn(unreachable_pub)]`Urgau-2/+2
2024-09-25Use `&raw` in the standard libraryJosh Stone-1/+1
Since the stabilization in #127679 has reached stage0, 1.82-beta, we can start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!` and `ptr::addr_of_mut!` can stop allowing the unstable feature. I intentionally did not change any documentation or tests, but the rest of those macro uses are all now using `&raw const` or `&raw mut` in the standard library.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-8/+5
2024-07-29Reformat `use` declarations.Nicholas Nethercote-3/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-03-19SeqCst->Relaxed in panic_unwind/emcc.Mara Bos-1/+1
SeqCst is unnecessary here.
2023-04-29Partial stabilisation of `c_unwind`Gary Guo-1/+1
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