1
Fork 0

avoid triple-backtrace due to panic-during-cleanup

This commit is contained in:
Ralf Jung 2023-08-27 20:02:46 +02:00
parent b60f7b51a2
commit 1087e90a2e
10 changed files with 90 additions and 31 deletions

View file

@ -395,9 +395,10 @@ pub mod __alloc_error_handler {
if unsafe { __rust_alloc_error_handler_should_panic != 0 } {
panic!("memory allocation of {size} bytes failed")
} else {
core::panicking::panic_nounwind_fmt(format_args!(
"memory allocation of {size} bytes failed"
))
core::panicking::panic_nounwind_fmt(
format_args!("memory allocation of {size} bytes failed"),
/* force_no_backtrace */ false,
)
}
}
}