Rollup merge of #105998 - RalfJung:no-unwind-panic-msg, r=thomcc
adjust message on non-unwinding panic "thread panicked while panicking" is just plain wrong in case this is a non-unwinding panic, such as - a panic out of a `nounwind` function - the sanity checks we have in `mem::uninitialized` and `mem::zeroed` - the optional debug assertion in various unsafe std library functions
This commit is contained in:
commit
d28ef9dbf1
1 changed files with 5 additions and 1 deletions
|
@ -699,7 +699,11 @@ fn rust_panic_with_hook(
|
|||
// have limited options. Currently our preference is to
|
||||
// just abort. In the future we may consider resuming
|
||||
// unwinding or otherwise exiting the thread cleanly.
|
||||
rtprintpanic!("thread panicked while panicking. aborting.\n");
|
||||
if !can_unwind {
|
||||
rtprintpanic!("thread caused non-unwinding panic. aborting.\n");
|
||||
} else {
|
||||
rtprintpanic!("thread panicked while panicking. aborting.\n");
|
||||
}
|
||||
crate::sys::abort_internal();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue