Commit b220827e authored by Hero Bird's avatar Hero Bird
Browse files

[examples/enzyme] Add panic_handler impl and alloc_error_handler impl

parent 8fd447a4
...@@ -18,6 +18,20 @@ use spin::Mutex; ...@@ -18,6 +18,20 @@ use spin::Mutex;
use alloc::string::String; use alloc::string::String;
#[panic_handler]
#[no_mangle]
pub fn panic(_info: &::core::panic::PanicInfo) -> ! {
unsafe {
core::intrinsics::abort()
}
}
#[alloc_error_handler]
pub extern fn oom(_: ::core::alloc::Layout) -> ! {
unsafe {
core::intrinsics::abort();
}
}
pub type Address = [u8; 32]; pub type Address = [u8; 32];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment