diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-02-24 22:39:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-24 22:39:00 +0100 |
| commit | 9975e848ff7f1dd6a45da7fbb22cd5a8742b2071 (patch) | |
| tree | 6189dcd8674bd2b5e0032138a8e53bc2b5b506ea | |
| parent | 106e30ed4157827d1ba4b9bb9edd3f0cacbe04de (diff) | |
| parent | f08e2d4137bdf0e443f4061c8b1289f0a92513be (diff) | |
| download | rust-9975e848ff7f1dd6a45da7fbb22cd5a8742b2071.tar.gz rust-9975e848ff7f1dd6a45da7fbb22cd5a8742b2071.zip | |
Rollup merge of #121551 - nbdd0121:ffi_unwind, r=RalfJung
Forbid use of `extern "C-unwind"` inside standard library Those libraries are build with `-C panic=unwind` and is expected to be linkable to `-C panic=abort` library. To ensure unsoundness compiler needs to prevent a `C-unwind` call to exist, as doing so may leak foreign exceptions into `-C panic=abort`. r? ``@RalfJung``
| -rw-r--r-- | library/alloc/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/core/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/proc_macro/src/lib.rs | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index b84273848ee..45e93feb6c5 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -92,6 +92,7 @@ #![warn(multiple_supertrait_upcastable)] #![allow(internal_features)] #![allow(rustdoc::redundant_explicit_links)] +#![deny(ffi_unwind_calls)] // // Library features: // tidy-alphabetical-start diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 456d88122af..49cead680e3 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -106,6 +106,7 @@ #![allow(incomplete_features)] #![warn(multiple_supertrait_upcastable)] #![allow(internal_features)] +#![deny(ffi_unwind_calls)] // Do not check link redundancy on bootstraping phase #![allow(rustdoc::redundant_explicit_links)] // diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index d05458a6944..610966625b5 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -36,6 +36,7 @@ #![feature(strict_provenance)] #![recursion_limit = "256"] #![allow(internal_features)] +#![deny(ffi_unwind_calls)] #[unstable(feature = "proc_macro_internals", issue = "27812")] #[doc(hidden)] |
