about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-05-07 13:05:47 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-05-07 13:05:47 +0000
commit9196eb3dd1506048dcbbfd8504e26ac2b130940b (patch)
tree15d1b87e31948629f26f03e87885eba0869511cb
parentfe059c1c548752c9022471e68b6d583a8347d085 (diff)
downloadrust-9196eb3dd1506048dcbbfd8504e26ac2b130940b.tar.gz
rust-9196eb3dd1506048dcbbfd8504e26ac2b130940b.zip
Fix mini_core for panic=unwind
-rw-r--r--example/mini_core.rs19
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) {