Skip to content

Double panic on MSVC no longer prints abort message #123470

Open
@CAD97

Description

@CAD97
Contributor

I tried this code:

struct DropPanic;
impl Drop for DropPanic {
    fn drop(&mut self) {
        panic!("panic in drop");
    }
}

fn main() {
    let _bomb = DropPanic;
    panic!("panic in main");
}

I expected to see this happen: I would see a "panic in a destructor during cleanup" message and the program would abort.

Instead, this happened: The second panic prints a full backtrace and then the program exits with STATUS_STACK_BUFFER_OVERRUN (that's a __fastfail; before, it was STATUS_ILLEGAL_INSTRUCTION: intrinsics::abort instead of process::abort.)

Meta

I didn't bisect to the specific release that changed this, but it's due to the change to allow well-nested unwinds with catch_unwind in destructors during cleanup. I also didn't test whether windows-gnu also behaves like this (if it still uses SEH unwinding, it does).

rustc 1.56.1 (59eed8a 2021-11-01) output (abort message)

thread 'main' panicked at 'panic in main', src\main.rs:10:5
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:517
   1: core::panicking::panic_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\core\src\panicking.rs:101
   2: cad97_playground::main
             at .\src\main.rs:10
   3: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\library\core\src\ops\function.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'panic in drop', src\main.rs:4:9
stack backtrace:
   0:     0x7ff60b526cfe - std::backtrace_rs::backtrace::dbghelp::trace
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
   1:     0x7ff60b526cfe - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff60b526cfe - std::sys_common::backtrace::_print_fmt
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\sys_common\backtrace.rs:67
   3:     0x7ff60b526cfe - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\sys_common\backtrace.rs:46
   4:     0x7ff60b53527a - core::fmt::write
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\core\src\fmt\mod.rs:1150
   5:     0x7ff60b524fa8 - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\io\mod.rs:1667
   6:     0x7ff60b528f16 - std::sys_common::backtrace::_print
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\sys_common\backtrace.rs:49
   7:     0x7ff60b528f16 - std::sys_common::backtrace::print
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\sys_common\backtrace.rs:36
   8:     0x7ff60b528f16 - std::panicking::default_hook::closure$1
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:210
   9:     0x7ff60b528a04 - std::panicking::default_hook
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:227
  10:     0x7ff60b529575 - std::panicking::rust_panic_with_hook
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:624
  11:     0x7ff60b52912f - std::panicking::begin_panic_handler::closure$0
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:519
  12:     0x7ff60b527647 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure$0,never$>
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\sys_common\backtrace.rs:141
  13:     0x7ff60b5290b9 - std::panicking::begin_panic_handler
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:517
  14:     0x7ff60b539ac0 - core::panicking::panic_fmt
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\core\src\panicking.rs:101
  15:     0x7ff60b52139f - cad97_playground::impl$0::drop
                               at D:\git\cad97\playground\src\main.rs:4
  16:     0x7ff60b52132e - core::ptr::drop_in_place<cad97_playground::DropPanic>
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\library\core\src\ptr\mod.rs:188
  17:     0x7ff60b5210c7 - cad97_playground::main
                               at D:\git\cad97\playground\src\main.rs:11
  18:     0x7ffb62171060 - <unknown>
  19:     0x7ffb621753ea - is_exception_typeof
  20:     0x7ffb6217fb80 - _C_specific_handler
  21:     0x7ffb621745f0 - is_exception_typeof
  22:     0x7ffb621804b1 - _CxxFrameHandler3
  23:     0x7ffb74ed448f - _chkstk
  24:     0x7ffb74e4fd54 - RtlUnwindEx
  25:     0x7ffb62180046 - _C_specific_handler
  26:     0x7ffb62173245 - is_exception_typeof
  27:     0x7ffb62173666 - is_exception_typeof
  28:     0x7ffb621746ec - is_exception_typeof
  29:     0x7ffb621804b1 - _CxxFrameHandler3
  30:     0x7ffb74ed440f - _chkstk
  31:     0x7ffb74e4e466 - RtlFindCharInUnicodeString
  32:     0x7ffb74e84465 - RtlRaiseException
  33:     0x7ffb727053ac - RaiseException
  34:     0x7ffb62176ba7 - CxxThrowException
  35:     0x7ff60b52c911 - panic_unwind::real_imp::panic
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\panic_unwind\src\seh.rs:313
  36:     0x7ff60b52c899 - panic_unwind::__rust_start_panic
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\panic_unwind\src\lib.rs:105
  37:     0x7ff60b52982b - std::panicking::rust_panic
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:672
  38:     0x7ff60b52972b - std::panicking::rust_panic_with_hook
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:642
  39:     0x7ff60b52912f - std::panicking::begin_panic_handler::closure$0
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:519
  40:     0x7ff60b527647 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure$0,never$>
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\sys_common\backtrace.rs:141
  41:     0x7ff60b5290b9 - std::panicking::begin_panic_handler
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:517
  42:     0x7ff60b539ac0 - core::panicking::panic_fmt
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\core\src\panicking.rs:101
  43:     0x7ff60b5210a0 - cad97_playground::main
                               at D:\git\cad97\playground\src\main.rs:10
  44:     0x7ff60b5212bb - core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\library\core\src\ops\function.rs:227
  45:     0x7ff60b52101b - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\library\std\src\sys_common\backtrace.rs:125
  46:     0x7ff60b521151 - std::rt::lang_start::closure$0<tuple$<> >
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\library\std\src\rt.rs:63
  47:     0x7ff60b5299c6 - core::ops::function::impls::impl$2::call_once
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\library\core\src\ops\function.rs:259
  48:     0x7ff60b5299c6 - std::panicking::try::do_call
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:403
  49:     0x7ff60b5299c6 - std::panicking::try
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:367
  50:     0x7ff60b5299c6 - std::panic::catch_unwind
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panic.rs:129
  51:     0x7ff60b5299c6 - std::rt::lang_start_internal::closure$2
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\rt.rs:45
  52:     0x7ff60b5299c6 - std::panicking::try::do_call
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:403
  53:     0x7ff60b5299c6 - std::panicking::try
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:367
  54:     0x7ff60b5299c6 - std::panic::catch_unwind
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panic.rs:129
  55:     0x7ff60b5299c6 - std::rt::lang_start_internal
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\rt.rs:45
  56:     0x7ff60b52111f - std::rt::lang_start<tuple$<> >
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\library\std\src\rt.rs:62
  57:     0x7ff60b5210e6 - main
  58:     0x7ff60b538874 - invoke_main
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  59:     0x7ff60b538874 - __scrt_common_main_seh
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  60:     0x7ffb746e257d - BaseThreadInitThunk
  61:     0x7ffb74e8aa48 - RtlUserThreadStart
thread panicked while panicking. aborting.

rustc 1.79.0-nightly (8df7e72 2024-03-30) output (no abort message)

thread 'main' panicked at src\main.rs:10:5:
panic in main
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:646
   1: core::panicking::panic_fmt
             at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\core\src\panicking.rs:72
   2: cad97_playground::main
             at .\src\main.rs:10
   3: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373\library\core\src\ops\function.rs:250
   4: core::hint::black_box
             at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373\library\core\src\hint.rs:338
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at src\main.rs:4:9:
panic in drop
stack backtrace:
   0:     0x7ff79eca63ea - std::backtrace_rs::backtrace::dbghelp64::trace
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:99
   1:     0x7ff79eca63ea - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff79eca63ea - std::sys_common::backtrace::_print_fmt
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\sys_common\backtrace.rs:68
   3:     0x7ff79eca63ea - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\sys_common\backtrace.rs:44
   4:     0x7ff79ecb36d9 - core::fmt::rt::Argument::fmt
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\core\src\fmt\rt.rs:142
   5:     0x7ff79ecb36d9 - core::fmt::write
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\core\src\fmt\mod.rs:1153
   6:     0x7ff79eca4a01 - std::io::Write::write_fmt<std::sys::pal::windows::stdio::Stderr>
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\io\mod.rs:1843
   7:     0x7ff79eca61d6 - std::sys_common::backtrace::print
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\sys_common\backtrace.rs:34
   8:     0x7ff79eca7cb8 - std::panicking::default_hook::closure$1
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:272
   9:     0x7ff79eca7957 - std::panicking::default_hook
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:292
  10:     0x7ff79eca81fd - std::panicking::rust_panic_with_hook
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:789
  11:     0x7ff79eca807b - std::panicking::begin_panic_handler::closure$0
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:650
  12:     0x7ff79eca6a7f - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\sys_common\backtrace.rs:171
  13:     0x7ff79eca7d68 - std::panicking::begin_panic_handler
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:646
  14:     0x7ff79ecb86a7 - core::panicking::panic_fmt
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\core\src\panicking.rs:72
  15:     0x7ff79eca1246 - cad97_playground::impl$0::drop
                               at D:\git\cad97\playground\src\main.rs:4
  16:     0x7ff79eca11ee - core::ptr::drop_in_place<cad97_playground::DropPanic>
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373\library\core\src\ptr\mod.rs:514
  17:     0x7ff79eca1107 - cad97_playground::main
                               at D:\git\cad97\playground\src\main.rs:11
  18:     0x7ffb62171060 - <unknown>
  19:     0x7ffb621753ea - is_exception_typeof
  20:     0x7ffb6217fb80 - _C_specific_handler
  21:     0x7ffb621745f0 - is_exception_typeof
  22:     0x7ffb621804b1 - _CxxFrameHandler3
  23:     0x7ffb74ed448f - _chkstk
  24:     0x7ffb74e4fd54 - RtlUnwindEx
  25:     0x7ffb62180046 - _C_specific_handler
  26:     0x7ffb62173245 - is_exception_typeof
  27:     0x7ffb62173666 - is_exception_typeof
  28:     0x7ffb621746ec - is_exception_typeof
  29:     0x7ffb621804b1 - _CxxFrameHandler3
  30:     0x7ffb74ed440f - _chkstk
  31:     0x7ffb74e4e466 - RtlFindCharInUnicodeString
  32:     0x7ffb74e84465 - RtlRaiseException
  33:     0x7ffb727053ac - RaiseException
  34:     0x7ffb62176ba7 - CxxThrowException
  35:     0x7ff79ecab650 - panic_unwind::real_imp::panic
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\panic_unwind\src\seh.rs:323
  36:     0x7ff79ecab650 - panic_unwind::__rust_start_panic
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\panic_unwind\src\lib.rs:106
  37:     0x7ff79eca8585 - std::panicking::rust_panic
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:841
  38:     0x7ff79eca8286 - std::panicking::rust_panic_with_hook
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:811
  39:     0x7ff79eca807b - std::panicking::begin_panic_handler::closure$0
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:650
  40:     0x7ff79eca6a7f - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\sys_common\backtrace.rs:171
  41:     0x7ff79eca7d68 - std::panicking::begin_panic_handler
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\panicking.rs:646
  42:     0x7ff79ecb86a7 - core::panicking::panic_fmt
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\core\src\panicking.rs:72
  43:     0x7ff79eca10ea - cad97_playground::main
                               at D:\git\cad97\playground\src\main.rs:10
  44:     0x7ff79eca117b - core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373\library\core\src\ops\function.rs:250
  45:     0x7ff79eca113e - core::hint::black_box
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373\library\core\src\hint.rs:338
  46:     0x7ff79eca113e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373\library\std\src\sys_common\backtrace.rs:155
  47:     0x7ff79eca12c1 - std::rt::lang_start::closure$0<tuple$<> >
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373\library\std\src\rt.rs:166
  48:     0x7ff79eca31d2 - std::rt::lang_start_internal
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373/library\std\src\rt.rs:148
  49:     0x7ff79eca129a - std::rt::lang_start<tuple$<> >
                               at /rustc/8df7e723ea729a7f917501cc2d91d640b7021373\library\std\src\rt.rs:165
  50:     0x7ff79eca1129 - main
  51:     0x7ff79ecb6e10 - invoke_main
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  52:     0x7ff79ecb6e10 - __scrt_common_main_seh
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  53:     0x7ffb746e257d - BaseThreadInitThunk
  54:     0x7ffb74e8aa48 - RtlUserThreadStart

full call stack when abort is called, as reported by vscode debugger

abort (@abort:21)
terminate (@terminate:12)
__FrameUnwindFilter (@__FrameUnwindFilter:20)
memset (@memset:346)
__C_specific_handler (@__C_specific_handler:46)
__chkstk (@__chkstk:121)
RtlFindCharInUnicodeString (@RtlFindCharInUnicodeString:714)
KiUserExceptionDispatcher (@KiUserExceptionDispatcher:15)
RaiseException (@RaiseException:26)
_CxxThrowException (@_CxxThrowException:42)
void panic_unwind::__rust_start_panic() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\panic_unwind\src\lib.rs:106)
void std::panicking::rust_panic() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:841)
void std::panicking::rust_panic_with_hook() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:811)
static void std::panicking::begin_panic_handler::closure$0() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:650)
static void std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys_common\backtrace.rs:171)
void std::panicking::begin_panic_handler() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:646)
void core::panicking::panic_fmt() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\panicking.rs:72)
140001246 (d:\git\cad97\playground\src\main.rs:4)
core::ptr::drop_in_place<cad97_playground::DropPanic> (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ptr\mod.rs:514)
static void cad97_playground::main() (d:\git\cad97\playground\src\main.rs:11)
180001060 (@7ffb62171060..7ffb621710d1:3)
_is_exception_typeof (@_is_exception_typeof:2790)
__C_specific_handler (@__C_specific_handler:377)
_is_exception_typeof (@_is_exception_typeof:1837)
__CxxFrameHandler3 (@__CxxFrameHandler3:33)
__chkstk (@__chkstk:163)
RtlUnwindEx (@RtlUnwindEx:152)
__C_specific_handler (@__C_specific_handler:724)
_is_exception_typeof (@_is_exception_typeof:517)
_is_exception_typeof (@_is_exception_typeof:791)
_is_exception_typeof (@_is_exception_typeof:1899)
__CxxFrameHandler3 (@__CxxFrameHandler3:33)
__chkstk (@__chkstk:121)
RtlFindCharInUnicodeString (@RtlFindCharInUnicodeString:714)
KiUserExceptionDispatcher (@KiUserExceptionDispatcher:15)
RaiseException (@RaiseException:26)
_CxxThrowException (@_CxxThrowException:42)
void panic_unwind::__rust_start_panic() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\panic_unwind\src\lib.rs:106)
void std::panicking::rust_panic() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:841)
void std::panicking::rust_panic_with_hook() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:811)
static void std::panicking::begin_panic_handler::closure$0() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:650)
static void std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys_common\backtrace.rs:171)
void std::panicking::begin_panic_handler() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:646)
void core::panicking::panic_fmt() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\panicking.rs:72)
static void cad97_playground::main() (d:\git\cad97\playground\src\main.rs:10)
void core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >( *) (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250)
void std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >( *) (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys_common\backtrace.rs:155)
int std::rt::lang_start::closure$0<tuple$<> >(struct std::rt::lang_start::closure_env$0<tuple$<> > *) (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\rt.rs:166)
void std::rt::lang_start_internal() (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\rt.rs:148)
__int64 std::rt::lang_start<tuple$<> >( *, __int64, unsigned char * *, unsigned char) (d:\.rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\rt.rs:165)
main (@main:9)
static int __scrt_common_main_seh() (@7ff79ecb6e10..7ff79ecb6e77:3)
BaseThreadInitThunk (@BaseThreadInitThunk:12)
RtlUserThreadStart (@RtlUserThreadStart:12)

@rustbot modify labels: +regression-from-stable-to-stable +O-windows

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
O-windowsOperating system: Windows
regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Apr 4, 2024
added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
on Apr 4, 2024
removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Apr 7, 2024
apiraino

apiraino commented on Apr 8, 2024

@apiraino
Contributor

WG-prioritization assigning priority (Zulip discussion).

@rustbot label -I-prioritize +P-medium

added and removed
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Apr 8, 2024
RodBurman

RodBurman commented on Feb 28, 2025

@RodBurman

Built with the current toolchain:

% cargo -v -V
cargo 1.85.0 (d73d2caf9 2024-12-31)
release: 1.85.0
commit-hash: d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7
commit-date: 2024-12-31
host: aarch64-apple-darwin
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.7.1 (sys:0.4.74+curl-8.9.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Mac OS 15.3.1 [64-bit]

Then running the executable produces:

% ./target/debug/dubpan 

thread 'main' panicked at src/main.rs:10:5:
panic in main
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' panicked at src/main.rs:4:9:
panic in drop
stack backtrace:
   0:        0x10450d888 - std::backtrace_rs::backtrace::libunwind::trace::h43235ac629484ce8
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:        0x10450d888 - std::backtrace_rs::backtrace::trace_unsynchronized::h3bc78969d500b9fc
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x10450d888 - std::sys::backtrace::_print_fmt::h66db558f95871955
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/backtrace.rs:66:9
   3:        0x10450d888 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h6e25c13836847e70
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/backtrace.rs:39:26
   4:        0x10452125c - core::fmt::rt::Argument::fmt::h23f1815b04d675dd
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/fmt/rt.rs:177:76
   5:        0x10452125c - core::fmt::write::h37cdb50ab8af3d55
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/fmt/mod.rs:1440:21
   6:        0x10450bc40 - std::io::Write::write_fmt::hd4c273f34c4c0a33
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/io/mod.rs:1887:15
   7:        0x10450d73c - std::sys::backtrace::BacktraceLock::print::h1df7364dde63dc75
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/backtrace.rs:42:9
   8:        0x10450e658 - std::panicking::default_hook::{{closure}}::h646e398272c5759a
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:295:22
   9:        0x10450e44c - std::panicking::default_hook::hf65fd28e95db7176
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:322:9
  10:        0x10450eed4 - std::panicking::rust_panic_with_hook::hc9e2ec2a12b10e12
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:828:13
  11:        0x10450eb24 - std::panicking::begin_panic_handler::{{closure}}::h3b6449e2eb83bf4c
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:694:13
  12:        0x10450dd3c - std::sys::backtrace::__rust_end_short_backtrace::h38d85099ddd107a3
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/backtrace.rs:168:18
  13:        0x10450e804 - rust_begin_unwind
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:692:5
  14:        0x104525e28 - core::panicking::panic_fmt::hd4003258f6ab7b29
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:75:14
  15:        0x1044f168c - <dubpan::DropPanic as core::ops::drop::Drop>::drop::h052e1fd985502941
                               at /Users/rod/code/rust/triage/dubpan/src/main.rs:4:9
  16:        0x1044f164c - core::ptr::drop_in_place<dubpan::DropPanic>::h96bbfa2fdde65def
                               at /Users/rod/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:523:1
  17:        0x1044f14f4 - dubpan::main::hbc2913652a0b4086
                               at /Users/rod/code/rust/triage/dubpan/src/main.rs:11:1
  18:        0x1044f1628 - core::ops::function::FnOnce::call_once::h15a1d11ac04b4905
                               at /Users/rod/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  19:        0x1044f14b0 - std::sys::backtrace::__rust_begin_short_backtrace::h1b8214cc8e444244
                               at /Users/rod/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152:18
  20:        0x1044f1480 - std::rt::lang_start::{{closure}}::hb0bb36e82bd9281e
                               at /Users/rod/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:195:18
  21:        0x10450a5b4 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc96b39a4ecdd95c5
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/ops/function.rs:284:13
  22:        0x10450a5b4 - std::panicking::try::do_call::h983d30e6bb7d7e14
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:584:40
  23:        0x10450a5b4 - std::panicking::try::h0af9dac8c0f26f59
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:547:19
  24:        0x10450a5b4 - std::panic::catch_unwind::h6336bd4878b4775e
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panic.rs:358:14
  25:        0x10450a5b4 - std::rt::lang_start_internal::{{closure}}::hf76d98f7260dcbc6
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/rt.rs:174:48
  26:        0x10450a5b4 - std::panicking::try::do_call::hd06b389542e0fe19
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:584:40
  27:        0x10450a5b4 - std::panicking::try::ha4dac3da202e5e6a
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:547:19
  28:        0x10450a5b4 - std::panic::catch_unwind::h9dd0cdca4f9d92ef
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panic.rs:358:14
  29:        0x10450a5b4 - std::rt::lang_start_internal::h5f91760815528aa2
                               at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/rt.rs:174:20
  30:        0x1044f144c - std::rt::lang_start::hf9bcf17c5db0548b
                               at /Users/rod/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:194:17
  31:        0x1044f1550 - _main

thread 'main' panicked at library/core/src/panicking.rs:226:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.
zsh: abort      ./target/debug/Dublin

Exit code is SIGABRT (134) so there is an abort at lines 5 & 9 of the code but no stack overflow or illegal instructions. I am not sure this is what is expected but it is not as described, this may be a consequence of a difference of OS/environment between the initial report and my system.

moxian

moxian commented on Mar 20, 2025

@moxian
Contributor

bisects to #110975

raw cargo-bisect-rustc output
********************************************************************************
Regression in nightly-2023-05-28
********************************************************************************

fetching https://static.rust-lang.org/dist/2023-05-27/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2023-05-27: 40 B / 40 B [======================================================] 100.00 % 198.79 KB/s converted 2023-05-27 to 1a5f8bce74ee432f7cc3aa131bc3d6920e06de10
fetching https://static.rust-lang.org/dist/2023-05-28/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2023-05-28: 40 B / 40 B [=======================================================] 100.00 % 87.37 KB/s converted 2023-05-28 to cca7ee58110726983951a19d5fb7316d9243925d
looking for regression commit between 2023-05-27 and 2023-05-28
fetching (via remote github) commits from max(1a5f8bce74ee432f7cc3aa131bc3d6920e06de10, 2023-05-25) to cca7ee58110726983951a19d5fb7316d9243925d
ending github query because we found starting sha: 1a5f8bce74ee432f7cc3aa131bc3d6920e06de10
get_commits_between returning commits, len: 10
  commit[0] 2023-05-26: Auto merge of #103291 - ink-feather-org:typeid_no_struct_match, r=dtolnay
  commit[1] 2023-05-26: Auto merge of #112013 - matthiaskrgr:rollup-a4pg2p8, r=matthiaskrgr
  commit[2] 2023-05-27: Auto merge of #111245 - fee1-dead-contrib:temp-fix-tuple-struct-field, r=lcnr
  commit[3] 2023-05-27: Auto merge of #111348 - ozkanonur:remove-hardcoded-rustdoc-flags, r=albertlarsan68,oli-obk
  commit[4] 2023-05-27: Auto merge of #111928 - c410-f3r:dqewdas, r=eholk
  commit[5] 2023-05-27: Auto merge of #111934 - scottmcm:stabilize-hash-one, r=Amanieu
  commit[6] 2023-05-27: Auto merge of #112016 - GuillaumeGomez:rollup-fhqn4i6, r=GuillaumeGomez
  commit[7] 2023-05-27: Auto merge of #110975 - Amanieu:panic_count, r=joshtriplett
  commit[8] 2023-05-27: Auto merge of #111006 - Mark-Simulacrum:relnotes, r=Mark-Simulacrum
  commit[9] 2023-05-27: Auto merge of #112025 - matthiaskrgr:rollup-j693v67, r=matthiaskrgr
ERROR: no CI builds available between 1a5f8bce74ee432f7cc3aa131bc3d6920e06de10 and cca7ee58110726983951a19d5fb7316d9243925d within last 167 days

@rustbot label: -E-needs-bisection +A-panic

added
A-panicArea: Panicking machinery
and removed
E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
on Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-panicArea: Panicking machineryC-bugCategory: This is a bug.O-windowsOperating system: WindowsP-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @CAD97@apiraino@moxian@saethlin@jieyouxu

        Issue actions

          Double panic on MSVC no longer prints abort message · Issue #123470 · rust-lang/rust