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

support panic=abort in Miri #76871

Merged
merged 1 commit into from
Sep 20, 2020
Merged

Conversation

RalfJung
Copy link
Member

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).

@rust-highfive
Copy link
Collaborator

r? @dtolnay

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 18, 2020
bors added a commit to rust-lang/miri that referenced this pull request 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`
@dtolnay
Copy link
Member

dtolnay commented Sep 19, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 19, 2020

📌 Commit 0810c3e has been approved by dtolnay

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request 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 pull request 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 pull request 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).
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 20, 2020
Rollup of 15 pull requests

Successful merges:

 - rust-lang#76722 (Test and fix Send and Sync traits of BTreeMap artefacts)
 - rust-lang#76766 (Extract some intrinsics out of rustc_codegen_llvm)
 - rust-lang#76800 (Don't generate bootstrap usage unless it's needed)
 - rust-lang#76809 (simplfy condition in ItemLowerer::with_trait_impl_ref())
 - rust-lang#76815 (Fix wording in mir doc)
 - rust-lang#76818 (Don't compile regex at every function call.)
 - rust-lang#76821 (Remove redundant nightly features)
 - rust-lang#76823 (black_box: silence unused_mut warning when building with cfg(miri))
 - rust-lang#76825 (use `array_windows` instead of `windows` in the compiler)
 - rust-lang#76827 (fix array_windows docs)
 - rust-lang#76828 (use strip_prefix over starts_with and manual slicing based on pattern length (clippy::manual_strip))
 - rust-lang#76840 (Move to intra doc links in core/src/future)
 - rust-lang#76845 (Use intra docs links in core::{ascii, option, str, pattern, hash::map})
 - rust-lang#76853 (Use intra-doc links in library/core/src/task/wake.rs)
 - rust-lang#76871 (support panic=abort in Miri)

Failed merges:

r? `@ghost`
@bors bors merged commit e5be14c into rust-lang:master Sep 20, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 20, 2020
@RalfJung RalfJung deleted the miri-panic-abort branch September 21, 2020 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants