Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6ac7fe7

Browse files
committedMay 27, 2024
Disable stack overflow handler tests on iOS-like platforms
1 parent cf64a2f commit 6ac7fe7

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed
 

‎library/std/src/sys/pal/unix/stack_overflow.rs

+8
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,14 @@ mod imp {
491491
}
492492
}
493493

494+
// This is intentionally not enabled on iOS/tvOS/watchOS/visionOS, as it uses
495+
// several symbols that might lead to rejections from the App Store, namely
496+
// `sigaction`, `sigaltstack`, `sysctlbyname`, `mmap`, `munmap` and `mprotect`.
497+
//
498+
// This might be overly cautious, though it is also what Swift does (and they
499+
// usually have fewer qualms about forwards compatibility, since the runtime
500+
// is shipped with the OS):
501+
// <https://github.com/apple/swift/blob/swift-5.10-RELEASE/stdlib/public/runtime/CrashHandlerMacOS.cpp>
494502
#[cfg(not(any(
495503
target_os = "linux",
496504
target_os = "freebsd",

‎tests/ui/abi/stack-probes-lto.rs

+4
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
//@ compile-flags: -C lto
1111
//@ no-prefer-dynamic
1212
//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino
13+
//@ ignore-ios Stack probes are enabled, but the SIGSEGV handler isn't
14+
//@ ignore-tvos Stack probes are enabled, but the SIGSEGV handler isn't
15+
//@ ignore-watchos Stack probes are enabled, but the SIGSEGV handler isn't
16+
//@ ignore-visionos Stack probes are enabled, but the SIGSEGV handler isn't
1317

1418
include!("stack-probes.rs");

‎tests/ui/abi/stack-probes.rs

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
//@ ignore-sgx no processes
99
//@ ignore-fuchsia no exception handler registered for segfault
1010
//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino
11+
//@ ignore-ios Stack probes are enabled, but the SIGSEGV handler isn't
12+
//@ ignore-tvos Stack probes are enabled, but the SIGSEGV handler isn't
13+
//@ ignore-watchos Stack probes are enabled, but the SIGSEGV handler isn't
14+
//@ ignore-visionos Stack probes are enabled, but the SIGSEGV handler isn't
1115

1216
use std::env;
1317
use std::mem::MaybeUninit;

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

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
//@ ignore-sgx no processes
88
//@ ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590)
99
//@ ignore-nto no stack overflow handler used (no alternate stack available)
10+
//@ ignore-ios stack overflow handlers aren't enabled
11+
//@ ignore-tvos stack overflow handlers aren't enabled
12+
//@ ignore-watchos stack overflow handlers aren't enabled
13+
//@ ignore-visionos stack overflow handlers aren't enabled
1014

1115
#![feature(rustc_private)]
1216

0 commit comments

Comments
 (0)
Failed to load comments.