Open
Description
Spawn off from #109672
test.rs:
#[no_mangle]
extern "C" fn d() {
struct Double;
impl Drop for Double {
fn drop(&mut self) {
std::process::abort();
}
}
let _d = Double;
panic!("once");
}
test.c:
void d();
int main(void) {
d();
}
compile with:
rustc -O test.rs --crate-type staticlib
gcc test.c libtest.a
./a.out
and I get:
thread '<unnamed>' panicked at 'once', test.rs:13:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted
cc @rust-lang/wg-ffi-unwind @nikic
@rustbot label: +T-compiler