diff options
| author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2021-05-13 18:41:18 +0100 |
|---|---|---|
| committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2021-05-13 18:42:52 +0100 |
| commit | 6369637a192bbd0a2fbf8084345ddb7c099aa460 (patch) | |
| tree | e4c665cdae94fd7d36bcab1a086d1419b3c8b494 | |
| parent | f6a4963cc86bda5f3611f0f59e1ffe53e4b9f3fa (diff) | |
| download | rust-6369637a192bbd0a2fbf8084345ddb7c099aa460.tar.gz rust-6369637a192bbd0a2fbf8084345ddb7c099aa460.zip | |
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>
| -rw-r--r-- | library/std/src/sys/unix/process/process_unix/tests.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/process/process-panic-after-fork.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/process/process_unix/tests.rs b/library/std/src/sys/unix/process/process_unix/tests.rs index d7915d81ebd..157debf2d25 100644 --- a/library/std/src/sys/unix/process/process_unix/tests.rs +++ b/library/std/src/sys/unix/process/process_unix/tests.rs @@ -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); } diff --git a/src/test/ui/process/process-panic-after-fork.rs b/src/test/ui/process/process-panic-after-fork.rs index 5cc436c335e..f178baefcf6 100644 --- a/src/test/ui/process/process-panic-after-fork.rs +++ b/src/test/ui/process/process-panic-after-fork.rs @@ -78,7 +78,7 @@ unsafe impl<A:GlobalAlloc> GlobalAlloc for PidChecking<A> { 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() { |
