diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2020-01-10 00:19:40 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2020-01-11 10:18:44 +0000 |
| commit | 3a025760be8f4c56f0777fa34ba64a4f7bada8e7 (patch) | |
| tree | e9123f65a83caf1dea1e924a64963f99f9d22f84 /src/libpanic_unwind/lib.rs | |
| parent | 757ed07f374edfe93be5c9084ac5c44ba738e1b2 (diff) | |
| download | rust-3a025760be8f4c56f0777fa34ba64a4f7bada8e7.tar.gz rust-3a025760be8f4c56f0777fa34ba64a4f7bada8e7.zip | |
Abort if C++ tries to swallow a Rust panic
Diffstat (limited to 'src/libpanic_unwind/lib.rs')
| -rw-r--r-- | src/libpanic_unwind/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs index 9451eefb9a5..6383ae39fb6 100644 --- a/src/libpanic_unwind/lib.rs +++ b/src/libpanic_unwind/lib.rs @@ -61,6 +61,12 @@ cfg_if::cfg_if! { } } +extern "C" { + /// Handler in libstd called when a panic object is dropped outside of + /// `catch_unwind`. + fn __rust_drop_panic() -> !; +} + mod dwarf; // Entry point for catching an exception, implemented using the `try` intrinsic |
