Skip to content

Commit 6369637

Browse files
committed
Tolerate SIGTRAP for panic abort after panic::always_abort
Some platforma (eg ARM64) apparently generate SIGTRAP for panic abort! See eg #81858 (comment) 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 <[email protected]>
1 parent f6a4963 commit 6369637

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/std/src/sys/unix/process/process_unix/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ fn test_command_fork_no_unwind() {
5353
let status = got.expect("panic unexpectedly propagated");
5454
dbg!(status);
5555
let signal = status.signal().expect("expected child process to die of signal");
56-
assert!(signal == libc::SIGABRT || signal == libc::SIGILL);
56+
assert!(signal == libc::SIGABRT || signal == libc::SIGILL || signal == libc::SIGTRAP);
5757
}

src/test/ui/process/process-panic-after-fork.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ unsafe impl<A:GlobalAlloc> GlobalAlloc for PidChecking<A> {
7878
fn expect_aborted(status: ExitStatus) {
7979
dbg!(status);
8080
let signal = status.signal().expect("expected child process to die of signal");
81-
assert!(signal == libc::SIGABRT || signal == libc::SIGILL);
81+
assert!(signal == libc::SIGABRT || signal == libc::SIGILL || signal == libc::SIGTRAP);
8282
}
8383

8484
fn main() {

0 commit comments

Comments
 (0)