Commit Graph

23 Commits

Author SHA1 Message Date
Eric Huss
331911e699 panic_unwind: Apply unsafe_op_in_unsafe_fn 2025-02-14 07:36:17 -08:00
Urgau
477ef65121 panic_unwind: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
Martin Kröning
27c4c3a978 update link to "C++ Exceptions under the hood" blog
The link was introduced in 0ec321f7b5.
For the old link see https://web.archive.org/web/20170409223244/https://monoinfinito.wordpress.com/series/exception-handling-in-c/.
The blog has migrated from WordPress to Blogger in 2021 and to GitHub pages in 2024.
2024-11-29 11:46:34 +01:00
Jubilee Young
f21f4cd60e library: Compute RUST_EXCEPTION_CLASS from native-endian bytes
This makes it appear correctly in hexdumps on both LE and BE platforms.
2024-09-26 11:34:17 -07:00
Josh Stone
f4d9d1a0ea Use &raw in the standard library
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-25 17:03:20 -07:00
Jubilee Young
fef7373d13 library: Compute Rust exception class from its string repr 2024-09-14 20:26:37 -07:00
Noa
125b26acf6 Use Itanium ABI for thrown exceptions 2024-02-22 17:39:49 -06:00
niluxv
e7a3c341dd Use pointers instead of usize addresses for landing pads
This bring unwind and personality code more in line with strict-provenance
2023-10-10 09:59:39 +02:00
Gary Guo
723aee2e56 Partial stabilisation of c_unwind 2023-04-29 13:01:44 +01:00
Gary Guo
979d1a2c78 Apply suggestion
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2022-10-23 20:30:16 +01:00
Gary Guo
e521a8d46b Prevent foreign Rust exceptions from being caught 2022-10-23 20:30:16 +01:00
Amanieu d'Antras
c110329f25 Remove custom frame info registration on i686-pc-windows-gnu
The indirection is no longer needed since we always link to libgcc
even when the panic_abort runtime is used. Instead we can just call
the libgcc functions directly.
2022-08-23 16:12:58 +08:00
Amanieu d'Antras
5ff0876694 Move personality functions to std
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-08-23 16:12:58 +08:00
Mads Marquart
15b7a08747 Fix unwinding when debug assertions are enabled
This came up on armv7-apple-ios when using -Zbuild-std
2022-07-30 05:14:54 +02:00
Vladimir Michael Eatwell
439d64a83c Library changes for Apple WatchOS 2022-07-20 08:57:36 +01:00
John Paul Adrian Glaubitz
990326fa74 library/panic_unwind: Define UNWIND_DATA_REG for m68k 2022-02-12 20:19:06 +00:00
Smitty
bdfcb88e8b Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
Guillaume Gomez
99200f760b Fix even more URLs 2020-11-05 20:11:29 +01:00
John Paul Adrian Glaubitz
1fefba5e0b library/{panic_,}unwind: Add definitions for sparc-unknow-linux-gnu 2020-09-28 00:39:57 +02:00
Alistair Francis
fd76268166 library/panic_unwind: Consolidate RV32 and RV64
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-16 14:31:42 -07:00
Alistair Francis
de0d55cb3c library/panic_unwind: Add UNWIND_DATA_REG for RISC-V 32-bit
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-16 08:42:55 -07:00
Amanieu d'Antras
239f833ed1 Abort when catch_unwind catches a foreign exception 2020-08-27 21:08:30 +01:00
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00