Tolerate SIGTRAP for panic abort after panic::always_abort
Some platforma (eg ARM64) apparently generate SIGTRAP for panic abort! See eg https://github.com/rust-lang/rust/pull/81858#issuecomment-840702765 This is probably a bug, but we don't want to entangle this MR with it. When it's fixed, this commit should be reverted. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This commit is contained in:
parent
f6a4963cc8
commit
6369637a19
@ -53,5 +53,5 @@ fn test_command_fork_no_unwind() {
|
||||
let status = got.expect("panic unexpectedly propagated");
|
||||
dbg!(status);
|
||||
let signal = status.signal().expect("expected child process to die of signal");
|
||||
assert!(signal == libc::SIGABRT || signal == libc::SIGILL);
|
||||
assert!(signal == libc::SIGABRT || signal == libc::SIGILL || signal == libc::SIGTRAP);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut
|
||||
fn expect_aborted(status: ExitStatus) {
|
||||
dbg!(status);
|
||||
let signal = status.signal().expect("expected child process to die of signal");
|
||||
assert!(signal == libc::SIGABRT || signal == libc::SIGILL);
|
||||
assert!(signal == libc::SIGABRT || signal == libc::SIGILL || signal == libc::SIGTRAP);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user