File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -124,10 +124,12 @@ mod unix {
124124 let is_panic_mode = matches ! ( crash_type, CrashType :: Panic ) ;
125125
126126 let called_panic_hook = Arc :: new ( AtomicBool :: new ( false ) ) ;
127+ let old_hook = std:: panic:: take_hook ( ) ;
127128 if is_panic_mode {
128129 let called_panic_hook_clone = Arc :: clone ( & called_panic_hook) ;
129- std:: panic:: set_hook ( Box :: new ( move |_ | {
130+ std:: panic:: set_hook ( Box :: new ( move |panic_info | {
130131 called_panic_hook_clone. store ( true , Ordering :: SeqCst ) ;
132+ old_hook ( panic_info) ;
131133 } ) ) ;
132134 }
133135
Original file line number Diff line number Diff line change @@ -351,7 +351,6 @@ fn test_crash_tracking_app(crash_type: &str) {
351351 . arg ( & fixtures. output_dir )
352352 . arg ( crash_type) ;
353353 } ,
354- false , // expect crash (not success)
355354 validator,
356355 )
357356 . unwrap ( ) ;
@@ -399,7 +398,6 @@ fn test_crash_tracking_bin_panic_hook_after_fork() {
399398 . arg ( "panic_hook_after_fork" ) // mode
400399 . arg ( "donothing" ) ; // crash method (not used in this mode)
401400 } ,
402- false , // expect crash (not success)
403401 validator,
404402 )
405403 . unwrap ( ) ;
@@ -445,9 +443,9 @@ fn test_crash_tracking_callstack() {
445443 |cmd, fixtures| {
446444 cmd. arg ( format ! ( "file://{}" , fixtures. crash_profile_path. display( ) ) )
447445 . arg ( & artifacts_map[ & crashtracker_receiver] )
448- . arg ( & fixtures. output_dir ) ;
446+ . arg ( & fixtures. output_dir )
447+ . arg ( "segfault" ) ;
449448 } ,
450- false , // expect crash (not success)
451449 |payload, _fixtures| {
452450 // Use the new callstack validator
453451 PayloadValidator :: new ( payload) . validate_callstack_functions ( & expected_functions) ?;
You can’t perform that action at this time.
0 commit comments