Skip to content

Commit 9196eb3

Browse files
committed
Fix mini_core for panic=unwind
1 parent fe059c1 commit 9196eb3

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

example/mini_core.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,27 @@ fn panic_cannot_unwind() -> ! {
521521
}
522522

523523
#[lang = "eh_personality"]
524-
fn eh_personality() -> ! {
524+
// FIXME personality signature depends on target
525+
fn eh_personality(
526+
_version: i32,
527+
_actions: i32,
528+
_exception_class: u64,
529+
_exception_object: *mut (),
530+
_context: *mut (),
531+
) -> i32 {
525532
loop {}
526533
}
527534

535+
#[lang = "panic_in_cleanup"]
536+
fn panic_in_cleanup() -> ! {
537+
loop {}
538+
}
539+
540+
#[link(name = "gcc_s")]
541+
extern "C" {
542+
fn _Unwind_Resume(exc: *mut ()) -> !;
543+
}
544+
528545
#[lang = "drop_in_place"]
529546
#[allow(unconditional_recursion)]
530547
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {

0 commit comments

Comments
 (0)