diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-07 13:05:47 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-07 13:05:47 +0000 |
| commit | 9196eb3dd1506048dcbbfd8504e26ac2b130940b (patch) | |
| tree | 15d1b87e31948629f26f03e87885eba0869511cb | |
| parent | fe059c1c548752c9022471e68b6d583a8347d085 (diff) | |
| download | rust-9196eb3dd1506048dcbbfd8504e26ac2b130940b.tar.gz rust-9196eb3dd1506048dcbbfd8504e26ac2b130940b.zip | |
Fix mini_core for panic=unwind
| -rw-r--r-- | example/mini_core.rs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/example/mini_core.rs b/example/mini_core.rs index 6e345b2a6fd..832135568f3 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -521,10 +521,27 @@ fn panic_cannot_unwind() -> ! { } #[lang = "eh_personality"] -fn eh_personality() -> ! { +// FIXME personality signature depends on target +fn eh_personality( + _version: i32, + _actions: i32, + _exception_class: u64, + _exception_object: *mut (), + _context: *mut (), +) -> i32 { loop {} } +#[lang = "panic_in_cleanup"] +fn panic_in_cleanup() -> ! { + loop {} +} + +#[link(name = "gcc_s")] +extern "C" { + fn _Unwind_Resume(exc: *mut ()) -> !; +} + #[lang = "drop_in_place"] #[allow(unconditional_recursion)] pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) { |
