-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
In particular catch_unwind
panics because of failing assert in
Line 289 in 266ecd6
debug_assert!(update_panic_count(0) == 0); |
For example:
struct Catch;
impl Drop for Catch {
fn drop(&mut self) {
let _ = std::panic::catch_unwind(|| {});
}
}
#[test]
#[should_panic]
fn it_works() {
let catch = Catch;
panic!("ups");
}
$ cargo test -Zbuild-std --target x86_64-unknown-linux-gnu
Compiling panic v0.1.0 (/.../panic)
Finished test [unoptimized + debuginfo] target(s) in 1.06s
Running target/x86_64-unknown-linux-gnu/debug/deps/panic-118296df2d538b47
running 1 test
thread panicked while panicking. aborting.
error: test failed, to rerun pass '--lib'
Caused by:
process didn't exit successfully: `/.../target/x86_64-unknown-linux-gnu/debug/deps/panic-118296df2d538b47` (signal: 4, SIGILL: illegal instruction)
Metadata
Metadata
Assignees
Labels
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.