Disable stack overflow handler tests on iOS-like platforms

This commit is contained in:
Mads Marquart 2024-05-16 12:58:09 +02:00
parent d82be822a8
commit 37ae2b68b1
4 changed files with 20 additions and 0 deletions

View file

@ -491,6 +491,14 @@ unsafe fn current_guard() -> Option<Range<usize>> {
}
}
// This is intentionally not enabled on iOS/tvOS/watchOS/visionOS, as it uses
// several symbols that might lead to rejections from the App Store, namely
// `sigaction`, `sigaltstack`, `sysctlbyname`, `mmap`, `munmap` and `mprotect`.
//
// This might be overly cautious, though it is also what Swift does (and they
// usually have fewer qualms about forwards compatibility, since the runtime
// is shipped with the OS):
// <https://github.com/apple/swift/blob/swift-5.10-RELEASE/stdlib/public/runtime/CrashHandlerMacOS.cpp>
#[cfg(not(any(
target_os = "linux",
target_os = "freebsd",

View file

@ -10,5 +10,9 @@
//@ compile-flags: -C lto
//@ no-prefer-dynamic
//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino
//@ ignore-ios Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-tvos Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-watchos Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-visionos Stack probes are enabled, but the SIGSEGV handler isn't
include!("stack-probes.rs");

View file

@ -8,6 +8,10 @@
//@ ignore-sgx no processes
//@ ignore-fuchsia no exception handler registered for segfault
//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino
//@ ignore-ios Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-tvos Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-watchos Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-visionos Stack probes are enabled, but the SIGSEGV handler isn't
use std::env;
use std::mem::MaybeUninit;

View file

@ -7,6 +7,10 @@
//@ ignore-sgx no processes
//@ ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590)
//@ ignore-nto no stack overflow handler used (no alternate stack available)
//@ ignore-ios stack overflow handlers aren't enabled
//@ ignore-tvos stack overflow handlers aren't enabled
//@ ignore-watchos stack overflow handlers aren't enabled
//@ ignore-visionos stack overflow handlers aren't enabled
#![feature(rustc_private)]