diff --git a/artiq/firmware/ksupport/eh.rs b/artiq/firmware/ksupport/eh.rs index 7d908340d..171835cf4 100644 --- a/artiq/firmware/ksupport/eh.rs +++ b/artiq/firmware/ksupport/eh.rs @@ -407,6 +407,7 @@ static mut INFLIGHT: ExceptionInfo = ExceptionInfo { }; #[export_name="__artiq_raise"] +#[unwind] pub unsafe extern fn raise(exception: *const Exception) -> ! { // Zing! The Exception<'a> as Exception<'static> cast is not really sound in case // the exception is ever captured. Fortunately, they currently aren't, and we save @@ -424,6 +425,7 @@ pub unsafe extern fn raise(exception: *const Exception) -> ! { } #[export_name="__artiq_reraise"] +#[unwind] pub unsafe extern fn reraise() -> ! { if INFLIGHT.handled { raise(&INFLIGHT.exception.unwrap()) diff --git a/artiq/firmware/ksupport/lib.rs b/artiq/firmware/ksupport/lib.rs index c762da4e5..944aa1183 100644 --- a/artiq/firmware/ksupport/lib.rs +++ b/artiq/firmware/ksupport/lib.rs @@ -1,4 +1,4 @@ -#![feature(lang_items, asm, libc, panic_unwind)] +#![feature(lang_items, asm, libc, panic_unwind, unwind_attributes)] #![no_std] extern crate alloc_none; diff --git a/artiq/test/libartiq_support/lib.rs b/artiq/test/libartiq_support/lib.rs index 8fc08a0ac..d9c609fe0 100644 --- a/artiq/test/libartiq_support/lib.rs +++ b/artiq/test/libartiq_support/lib.rs @@ -1,4 +1,4 @@ -#![feature(libc, panic_unwind)] +#![feature(libc, panic_unwind, unwind_attributes)] #![crate_name = "artiq_support"] #![crate_type = "cdylib"]