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

Add support for abort panics #1058

Closed
Aaron1011 opened this issue Nov 17, 2019 · 0 comments · Fixed by #1554
Closed

Add support for abort panics #1058

Aaron1011 opened this issue Nov 17, 2019 · 0 comments · Fixed by #1554
Labels
A-meta Not about any part of Miri per se, but about shaping the environment to make something in/with Miri A-panics Area: affects panics and unwinding C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement

Comments

@Aaron1011
Copy link
Member

Once #693 is merged, we will have support for unwind panics. However, we will not support abort panics, due to a quirk in how libpanic_abort is compiled.

I've opend a rust PR to fix the underlying issue: rust-lang/rust#66489. Once it's merged (or another solution is found), we can re-enable these tests

@RalfJung RalfJung added A-meta Not about any part of Miri per se, but about shaping the environment to make something in/with Miri C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement A-panics Area: affects panics and unwinding labels Nov 17, 2019
bors added a commit that referenced this issue Sep 18, 2020
support panic=abort

This adds support for abort-on-panic (#1058). To achieve this, we insert `cargo-miri` as `RUSTC` when building the standard library, and patch the rustc flags in a way similar to what bootstrap does.

However, this is currently not supported on Windows as the Windows code uses inline assembly to cause an abort (?!?). I'll submit a rustc PR with some `cffg(miri)` to make that work. (EDIT: that would be rust-lang/rust#76871)

Cc `@Aaron1011` r? `@oli-obk`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 19, 2020
support panic=abort in Miri

This is needed for rust-lang/miri#1058 on Windows: we cannot run the inline-assembly versions of `abort`, so fall back to the intrinsic (which Miri supports).
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 19, 2020
support panic=abort in Miri

This is needed for rust-lang/miri#1058 on Windows: we cannot run the inline-assembly versions of `abort`, so fall back to the intrinsic (which Miri supports).
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 19, 2020
support panic=abort in Miri

This is needed for rust-lang/miri#1058 on Windows: we cannot run the inline-assembly versions of `abort`, so fall back to the intrinsic (which Miri supports).
RalfJung added a commit to RalfJung/rust that referenced this issue Sep 20, 2020
support panic=abort in Miri

This is needed for rust-lang/miri#1058 on Windows: we cannot run the inline-assembly versions of `abort`, so fall back to the intrinsic (which Miri supports).
@bors bors closed this as completed in 5a15c8a Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Not about any part of Miri per se, but about shaping the environment to make something in/with Miri A-panics Area: affects panics and unwinding C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants