mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-20 04:06:30 +00:00
Handle SIGILL in LLVM.
This commit is contained in:
@ -4,7 +4,7 @@ use libc::{
|
|||||||
c_void, mmap, mprotect, munmap, siginfo_t, MAP_ANON, MAP_PRIVATE, PROT_EXEC, PROT_NONE,
|
c_void, mmap, mprotect, munmap, siginfo_t, MAP_ANON, MAP_PRIVATE, PROT_EXEC, PROT_NONE,
|
||||||
PROT_READ, PROT_WRITE,
|
PROT_READ, PROT_WRITE,
|
||||||
};
|
};
|
||||||
use nix::sys::signal::{sigaction, SaFlags, SigAction, SigHandler, SigSet, SIGBUS, SIGSEGV};
|
use nix::sys::signal::{sigaction, SaFlags, SigAction, SigHandler, SigSet, SIGBUS, SIGSEGV, SIGILL};
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
/// `__register_frame` and `__deregister_frame` on macos take a single fde as an
|
/// `__register_frame` and `__deregister_frame` on macos take a single fde as an
|
||||||
@ -57,6 +57,7 @@ pub unsafe fn install_signal_handler() {
|
|||||||
);
|
);
|
||||||
sigaction(SIGSEGV, &sa).unwrap();
|
sigaction(SIGSEGV, &sa).unwrap();
|
||||||
sigaction(SIGBUS, &sa).unwrap();
|
sigaction(SIGBUS, &sa).unwrap();
|
||||||
|
sigaction(SIGILL, &sa).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(nightly, unwind(allowed))]
|
#[cfg_attr(nightly, unwind(allowed))]
|
||||||
|
Reference in New Issue
Block a user