Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
geofft opened this issue May 29, 2015 · 3 comments
Open

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

geofft opened this issue May 29, 2015 · 3 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-bug Category: This is a bug. O-android Operating system: Android O-netbsd Operating system: NetBSD T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@geofft
Copy link
Contributor

geofft commented May 29, 2015

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.

@Mark-Simulacrum
Copy link
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.

@Mark-Simulacrum Mark-Simulacrum added O-ios Operating system: iOS and removed A-bitrig O-freebsd Operating system: FreeBSD O-openbsd Operating system: OpenBSD labels May 12, 2017
@Mark-Simulacrum Mark-Simulacrum added the O-netbsd Operating system: NetBSD label Jun 22, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 22, 2017
@steveklabnik
Copy link
Member

Triage: no change

@jonas-schievink jonas-schievink added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed A-build labels Apr 21, 2019
@jyn514 jyn514 added A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels May 20, 2023
@madsmtm
Copy link
Contributor

madsmtm commented May 17, 2024

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

jieyouxu added a commit to jieyouxu/rust that referenced this issue May 28, 2024
…workingjubilee

Make more of the test suite run on Mac Catalyst

Combined with rust-lang#125225, the only failing parts of the test suite are in `tests/rustdoc-js`, `tests/rustdoc-js-std` and `tests/debuginfo`. Tested with:
```console
./x test --target=aarch64-apple-ios-macabi library/std
./x test --target=aarch64-apple-ios-macabi --skip=tests/rustdoc-js --skip=tests/rustdoc-js-std --skip=tests/debuginfo tests
```

Will probably put up a PR later to enable _running_ on (not just compiling for) Mac Catalyst in CI, though not sure where exactly I should do so? `src/ci/github-actions/jobs.yml`?

Note that I've deliberately _not_ enabled stack overflow handlers on iOS/tvOS/watchOS/visionOS (see rust-lang#25872), but rather just skipped those tests, as it uses quite a few APIs that I'd be weary about getting rejected by the App Store (note that Swift doesn't do it on those platforms either).

r? `@workingjubilee`

CC `@thomcc`

`@rustbot` label O-ios O-apple
jieyouxu added a commit to jieyouxu/rust that referenced this issue May 29, 2024
…workingjubilee

Make more of the test suite run on Mac Catalyst

Combined with rust-lang#125225, the only failing parts of the test suite are in `tests/rustdoc-js`, `tests/rustdoc-js-std` and `tests/debuginfo`. Tested with:
```console
./x test --target=aarch64-apple-ios-macabi library/std
./x test --target=aarch64-apple-ios-macabi --skip=tests/rustdoc-js --skip=tests/rustdoc-js-std --skip=tests/debuginfo tests
```

Will probably put up a PR later to enable _running_ on (not just compiling for) Mac Catalyst in CI, though not sure where exactly I should do so? `src/ci/github-actions/jobs.yml`?

Note that I've deliberately _not_ enabled stack overflow handlers on iOS/tvOS/watchOS/visionOS (see rust-lang#25872), but rather just skipped those tests, as it uses quite a few APIs that I'd be weary about getting rejected by the App Store (note that Swift doesn't do it on those platforms either).

r? ``@workingjubilee``

CC ``@thomcc``

``@rustbot`` label O-ios O-apple
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 29, 2024
Rollup merge of rust-lang#125226 - madsmtm:fix-mac-catalyst-tests, r=workingjubilee

Make more of the test suite run on Mac Catalyst

Combined with rust-lang#125225, the only failing parts of the test suite are in `tests/rustdoc-js`, `tests/rustdoc-js-std` and `tests/debuginfo`. Tested with:
```console
./x test --target=aarch64-apple-ios-macabi library/std
./x test --target=aarch64-apple-ios-macabi --skip=tests/rustdoc-js --skip=tests/rustdoc-js-std --skip=tests/debuginfo tests
```

Will probably put up a PR later to enable _running_ on (not just compiling for) Mac Catalyst in CI, though not sure where exactly I should do so? `src/ci/github-actions/jobs.yml`?

Note that I've deliberately _not_ enabled stack overflow handlers on iOS/tvOS/watchOS/visionOS (see rust-lang#25872), but rather just skipped those tests, as it uses quite a few APIs that I'd be weary about getting rejected by the App Store (note that Swift doesn't do it on those platforms either).

r? ``@workingjubilee``

CC ``@thomcc``

``@rustbot`` label O-ios O-apple
github-actions bot pushed a commit to rust-lang/miri that referenced this issue May 30, 2024
…bilee

Make more of the test suite run on Mac Catalyst

Combined with rust-lang/rust#125225, the only failing parts of the test suite are in `tests/rustdoc-js`, `tests/rustdoc-js-std` and `tests/debuginfo`. Tested with:
```console
./x test --target=aarch64-apple-ios-macabi library/std
./x test --target=aarch64-apple-ios-macabi --skip=tests/rustdoc-js --skip=tests/rustdoc-js-std --skip=tests/debuginfo tests
```

Will probably put up a PR later to enable _running_ on (not just compiling for) Mac Catalyst in CI, though not sure where exactly I should do so? `src/ci/github-actions/jobs.yml`?

Note that I've deliberately _not_ enabled stack overflow handlers on iOS/tvOS/watchOS/visionOS (see rust-lang/rust#25872), but rather just skipped those tests, as it uses quite a few APIs that I'd be weary about getting rejected by the App Store (note that Swift doesn't do it on those platforms either).

r? ``@workingjubilee``

CC ``@thomcc``

``@rustbot`` label O-ios O-apple
@rustbot rustbot removed the O-ios Operating system: iOS label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-bug Category: This is a bug. O-android Operating system: Android O-netbsd Operating system: NetBSD T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

9 participants