mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-16 18:31:23 +00:00
Add well placed unwind(allowed) attribute
This commit is contained in:
@ -75,10 +75,12 @@ extern "C" {
|
||||
fn module_delete(module: *mut LLVMModule);
|
||||
fn get_func_symbol(module: *mut LLVMModule, name: *const c_char) -> *const vm::Func;
|
||||
|
||||
fn throw_trap(ty: i32) -> !;
|
||||
fn throw_trap(ty: i32);
|
||||
|
||||
/// This should be the same as spliting up the fat pointer into two arguments,
|
||||
/// but this is cleaner, I think?
|
||||
#[cfg_attr(nightly, unwind(allowed))]
|
||||
#[allow(improper_ctypes)]
|
||||
fn throw_any(data: *mut dyn Any) -> !;
|
||||
|
||||
#[allow(improper_ctypes)]
|
||||
@ -438,7 +440,7 @@ impl ProtectedCaller for LLVMProtectedCaller {
|
||||
|
||||
impl UserTrapper for Placeholder {
|
||||
unsafe fn do_early_trap(&self, data: Box<dyn Any>) -> ! {
|
||||
throw_any(Box::leak(data))
|
||||
throw_any(Box::leak(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user