about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/panic/unwind_panic_abort.rs
blob: 88419b1395c73a63894191c75ce762c0eabfaffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@compile-flags: -Cpanic=abort

//! Unwinding despite `-C panic=abort` is an error.

extern "Rust" {
    fn miri_start_unwind(payload: *mut u8) -> !;
}

fn main() {
    unsafe {
        miri_start_unwind(&mut 0); //~ ERROR: unwinding past a stack frame that does not allow unwinding
    }
}