-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Miri: run panic-catching tests in liballoc #66662
Conversation
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -1643,6 +1648,9 @@ fn panic_safe() { | |||
} | |||
} | |||
} | |||
|
|||
// Set default panic hook again. | |||
drop(panic::take_hook()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting the global panic hook in a test seems like a bad idea anyway as it affects other tests running in parallel, but this way at least we do not affect tests running later.
Ping from triage: |
This is waiting for review. r? @dtolnay |
@bors r+ |
📌 Commit a229979 has been approved by |
⌛ Testing commit a229979 with merge e5292bd57e5d24e3688d79c358690cc6a3d46c1e... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-azure |
@bors retry spurious |
Miri: run panic-catching tests in liballoc I also converted two tests from using `thread::spawn(...).join()` just for catching panics, to `catch_panic`, so that Miri can run them.
Rollup of 9 pull requests Successful merges: - #66503 (More useful test error messages on should_panic(expected=...) mismatch) - #66662 (Miri: run panic-catching tests in liballoc) - #66679 (Improve lifetime errors with implicit trait object lifetimes) - #66726 (Use recursion_limit for const eval stack limit) - #66790 (Do `min_const_fn` checks for `SetDiscriminant`s target) - #66832 (const_prop: detect and avoid catching Miri errors that require allocation) - #66880 (Add long error code explanation message for E0203) - #66890 (Format liballoc with rustfmt) - #66896 (pass Queries to compiler callbacks) Failed merges: r? @ghost
I also converted two tests from using
thread::spawn(...).join()
just for catching panics, tocatch_panic
, so that Miri can run them.