| Age | Commit message (Collapse) | Author | Lines |
|
The `unwinding` crate supports processing unwinding data, and is written
entirely in Rust. This allows it to be ported to new platforms more
easily than using the llvm-based `libunwind`.
While `libunwind` is very well supported on major targets, it is
difficult to use on other targets. SGX is an example of this where Rust
carries custom patches in order to enable backtrace support.
This adds an alternative for supported architectures. Rather than
providing a custom target, `unwinding` allows for a solution that is
completely written in Rust.
This adds `xous` as the first consumer, and forthcoming patches will
modify libstd to take advantage of this.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This bring unwind and personality code more in line with strict-provenance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reduce exceptions overallocation on non Windows x86_64
Addressing https://github.com/rust-lang/rust/pull/103894#discussion_r1020950196
|
|
Addressing https://github.com/rust-lang/rust/pull/103894#discussion_r1020950196
|
|
That change had been lost during rebase
|
|
This fixes unwinding on `aarch64-*-windows-gnu*`.
|
|
|
|
|
|
This ensures that there are no calls to `C-unwind` function in libunwind.
|
|
libunwind: readd link attrs to _Unwind_Backtrace
It seems the removal of these in 1c07096a45a15de64216f12ec726333870e372b1 was unintended; readding them fixes the build.
fixes rust-lang/rust#93349
r? `@alexcrichton`
|
|
|
|
It seems the removal of these in
1c07096a45a15de64216f12ec726333870e372b1 was unintended; readding them
fixes the build.
fixes rust-lang/rust#93349
|
|
|
|
This commit intends to fill out some of the remaining pieces of the
C-unwind ABI. This has a number of other changes with it though to move
this design space forward a bit. Notably contained within here is:
* On `panic=unwind`, the `extern "C"` ABI is now considered as "may
unwind". This fixes a longstanding soundness issue where if you
`panic!()` in an `extern "C"` function defined in Rust that's actually
UB because the LLVM representation for the function has the `nounwind`
attribute, but then you unwind.
* Whether or not a function unwinds now mainly considers the ABI of the
function instead of first checking the panic strategy. This fixes a
miscompile of `extern "C-unwind"` with `panic=abort` because that ABI
can still unwind.
* The aborting stub for non-unwinding ABIs with `panic=unwind` has been
reimplemented. Previously this was done as a small tweak during MIR
generation, but this has been moved to a separate and dedicated MIR
pass. This new pass will, for appropriate functions and function
calls, insert a `cleanup` landing pad for any function call that may
unwind within a function that is itself not allowed to unwind. Note
that this subtly changes some behavior from before where previously on
an unwind which was caught-to-abort it would run active destructors in
the function, and now it simply immediately aborts the process.
* The `#[unwind]` attribute has been removed and all users in tests and
such are now using `C-unwind` and `#![feature(c_unwind)]`.
I think this is largely the last piece of the RFC to implement.
Unfortunately I believe this is still not stabilizable as-is because
activating the feature gate changes the behavior of the existing `extern
"C"` ABI in a way that has no replacement. My thinking for how to enable
this is that we add support for the `C-unwind` ABI on stable Rust first,
and then after it hits stable we change the behavior of the `C` ABI.
That way anyone straddling stable/beta/nightly can switch to `C-unwind`
safely.
|
|
|
|
|
|
|
|
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
|
|
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
|
|
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
|
|
|