mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-17 10:51:21 +00:00
fix(llvm-backend) Mark some variables as unused.
This commit is contained in:
@ -49,24 +49,22 @@ pub unsafe fn install_signal_handler() {
|
|||||||
SaFlags::SA_ONSTACK | SaFlags::SA_SIGINFO,
|
SaFlags::SA_ONSTACK | SaFlags::SA_SIGINFO,
|
||||||
SigSet::empty(),
|
SigSet::empty(),
|
||||||
);
|
);
|
||||||
// sigaction(SIGFPE, &sa).unwrap();
|
|
||||||
// sigaction(SIGILL, &sa).unwrap();
|
|
||||||
sigaction(SIGSEGV, &sa).unwrap();
|
sigaction(SIGSEGV, &sa).unwrap();
|
||||||
sigaction(SIGBUS, &sa).unwrap();
|
sigaction(SIGBUS, &sa).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(nightly, unwind(allowed))]
|
#[cfg_attr(nightly, unwind(allowed))]
|
||||||
extern "C" fn signal_trap_handler(
|
extern "C" fn signal_trap_handler(
|
||||||
signum: ::nix::libc::c_int,
|
_signum: ::nix::libc::c_int,
|
||||||
siginfo: *mut siginfo_t,
|
_siginfo: *mut siginfo_t,
|
||||||
ucontext: *mut c_void,
|
_ucontext: *mut c_void,
|
||||||
) {
|
) {
|
||||||
unsafe {
|
unsafe {
|
||||||
/// Apparently, we can unwind from arbitary instructions, as long
|
// Apparently, we can unwind from arbitary instructions, as long
|
||||||
/// as we don't need to catch the exception inside the function that
|
// as we don't need to catch the exception inside the function that
|
||||||
/// was interrupted.
|
// was interrupted.
|
||||||
///
|
//
|
||||||
/// This works on macos, not sure about linux.
|
// This works on macos, not sure about linux.
|
||||||
throw_trap(2);
|
throw_trap(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user