File tree 2 files changed +4
-2
lines changed
src/tools/miri/tests/fail/panic
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,10 @@ fn default_hook(info: &PanicInfo<'_>) {
246
246
pub fn panic_hook_with_disk_dump ( info : & PanicInfo < ' _ > , path : Option < & crate :: path:: Path > ) {
247
247
// If this is a double panic, make sure that we print a backtrace
248
248
// for this panic. Otherwise only print it if logging is enabled.
249
- let backtrace = if panic_count:: get_count ( ) >= 2 {
249
+ // We do not keep printing for further panics, so that e.g. a "panic inside a drop on an unwind
250
+ // path", which leads to a triple-panic (the third panic being "cannot unwind here"), doesn't
251
+ // print *two* backtraces.
252
+ let backtrace = if panic_count:: get_count ( ) == 2 {
250
253
BacktraceStyle :: full ( )
251
254
} else {
252
255
crate :: panic:: get_backtrace_style ( )
Original file line number Diff line number Diff line change 6
6
stack backtrace:
7
7
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
8
8
panic in a destructor during cleanup
9
- stack backtrace:
10
9
thread caused non-unwinding panic. aborting.
11
10
error: abnormal termination: the program aborted execution
12
11
--> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
You can’t perform that action at this time.
0 commit comments