Skip to content
/ rust Public
forked from rust-lang/rust

Commit c6492d9

Browse files
committed
don't check the signal code of the stack overflow handler on macOS
The specific signal sent by the handler is unreliable when the stack overflow occurs in a TLS destructor. So just don't check the signal code, the only relevant part is that the program doesn't return a success.
1 parent 098235c commit c6492d9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/ui/runtime/out-of-stack.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,10 @@ fn check_status(status: std::process::ExitStatus)
5656
use std::os::unix::process::ExitStatusExt;
5757

5858
assert!(!status.success());
59+
// Apple's libc has a bug where calling abort in a TLS destructor on a thread
60+
// other than the main thread doesn't always result in SIGTRAP.
5961
#[cfg(not(target_vendor = "apple"))]
6062
assert_eq!(status.signal(), Some(libc::SIGABRT));
61-
62-
// Apple's libc has a bug where calling abort in a TLS destructor on a thread
63-
// other than the main thread results in a SIGTRAP instead of a SIGABRT.
64-
#[cfg(target_vendor = "apple")]
65-
assert!(matches!(status.signal(), Some(libc::SIGABRT | libc::SIGTRAP)));
6663
}
6764

6865
#[cfg(not(unix))]

0 commit comments

Comments
 (0)