Enable segfault / bus error handlers on more UNIX platforms

1b00e97
Opened by Geoffrey Thomas at 2024-08-21 19:46:45

src/libstd/sys/unix/stack_overflow.rs is enabled on Linux, OS X, Bitrig, and OpenBSD targets only, because the implementation used to have its own signal-handling bindings that were only known to be correct on those targets. In #25784 I refactored the bindings and verified them for all current ports, I think we can turn this on on all current ports. This would enable handlers on Android, iOS, FreeBSD, and Dragonfly.

I don't have easy build infras for these myself, so I'm probably not going to do this immediately. But if someone wants to test one out and make sure that it works, I think it's just a matter of adding an OS to the #[cfg] and writing a program that segfaults.

  1. Linux, macOS, Bitrig, Dragonfly, FreeBSD, Solaris, NetBSD (but not vendor = rumprun), and OpenBSD currently have the impl enabled. It seems that only Android and iOS are left to be enabled here, so removing the A- tags that are non-relevant any more.

    Mark Rousskov at 2017-05-12 00:44:38

  2. Triage: no change

    Steve Klabnik at 2018-10-31 14:41:49

  3. In https://github.com/rust-lang/rust/pull/125226, while I believe they could fairly easily be implemented on iOS, tvOS, watchOS and visionOS, instead of enabling them I've gone with documenting why we don't; they might lead to rejections from the App Store.

    @rustbot label -O-ios

    Mads Marquart at 2024-05-17 20:39:11