Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
[lucet-runtime-tests] expect SIGSEGV on FreeBSD like on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
valpackett committed May 9, 2020
1 parent 2d20175 commit f1a9fd4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lucet-runtime/lucet-runtime-tests/src/guest_fault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,14 @@ macro_rules! guest_fault_tests {
static ref RECOVERABLE_PTR_LOCK: Mutex<()> = Mutex::new(());
}

#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
const INVALID_PERMISSION_FAULT: libc::c_int = SIGSEGV;
#[cfg(not(target_os = "linux"))]
#[cfg(not(any(target_os = "linux", target_os = "freebsd")))]
const INVALID_PERMISSION_FAULT: libc::c_int = SIGBUS;

#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
const INVALID_PERMISSION_SIGNAL: Signal = Signal::SIGSEGV;
#[cfg(not(target_os = "linux"))]
#[cfg(not(any(target_os = "linux", target_os = "freebsd")))]
const INVALID_PERMISSION_SIGNAL: Signal = Signal::SIGBUS;

unsafe fn recoverable_ptr_setup() {
Expand Down

0 comments on commit f1a9fd4

Please sign in to comment.