1 // Tests that C++ double unwinding through Rust code will be properly guarded
2 // against instead of exhibiting undefined behaviour.
7 fn throw_cxx_exception();
8 fn cxx_catch_callback(cb: extern "C-unwind" fn());
13 impl Drop for ThrowOnDrop {
15 unsafe { throw_cxx_exception() };
19 extern "C-unwind" fn test_double_unwind() {
25 unsafe { cxx_catch_callback(test_double_unwind) };