File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/tools/miri/tests/fail/panic Expand file tree Collapse file tree 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<'_>) {
246246pub fn panic_hook_with_disk_dump ( info : & PanicInfo < ' _ > , path : Option < & crate :: path:: Path > ) {
247247 // If this is a double panic, make sure that we print a backtrace
248248 // 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 {
250253 BacktraceStyle :: full ( )
251254 } else {
252255 crate :: panic:: get_backtrace_style ( )
Original file line number Diff line number Diff line change 66stack backtrace:
77thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
88panic in a destructor during cleanup
9- stack backtrace:
109thread caused non-unwinding panic. aborting.
1110error: abnormal termination: the program aborted execution
1211 --> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
You can’t perform that action at this time.
0 commit comments