Skip to content

Enable segfault / bus error handlers on more UNIX platforms #25872

Open

Description

@geofft

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.

Activity

  1. Mark-Simulacrum commented on May 12, 2017

    @Mark-Simulacrum
    Member

    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.

  2. 3 remaining items

  3. steveklabnik commented on Oct 31, 2018

    @steveklabnik
    Contributor

    Triage: no change

  4. added
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    and removed on Apr 21, 2019
  5. added
    A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    and removed
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    on May 20, 2023
  6. madsmtm commented on May 17, 2024

    @madsmtm
    Member

    In #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

  7. added 2 commits that reference this issue on May 28, 2024
  8. added a commit that references this issue on May 29, 2024
  9. joboet commented on Sep 3, 2026

    @joboet
    Member

    @rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsA-stack-probeArea: Stack probing and guard pagesC-bugCategory: This is a bug.O-androidOperating system: AndroidO-netbsdOperating system: NetBSDT-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions