rust/tests/fail/panic/unwind_panic_abort.rs

14 lines
290 B
Rust
Raw Normal View History

2022-07-08 11:08:32 -05:00
//@compile-flags: -Cpanic=abort
//! Unwinding despite `-C panic=abort` is an error.
extern "Rust" {
fn miri_start_panic(payload: *mut u8) -> !;
}
fn main() {
unsafe {
miri_start_panic(&mut 0); //~ ERROR: unwinding past a stack frame that does not allow unwinding
2022-06-21 13:40:02 -05:00
}
}