KSCrash icon indicating copy to clipboard operation
KSCrash copied to clipboard

Mach exception capture, Is the heimdallr.mach_exception.secondary thread necessary?

Open JunyiXie opened this issue 5 years ago • 2 comments

Mach exception capture Is the heimdallr.mach_exception.secondary thread necessary?

https://github.com/kstenerud/KSCrash/blob/master/Source/KSCrash/Recording/Monitors/KSCrashMonitor_MachException.c#L314

JunyiXie avatar Mar 13 '19 13:03 JunyiXie

It's needed in case the crash handling code itself crashes.

kstenerud avatar Jun 11 '19 09:06 kstenerud

I fell into the same question.

https://github.com/kstenerud/KSCrash/blob/875de511c14bc2681b568c697fb5c8d84dc19a3a/Source/KSCrash/Recording/Monitors/KSCrashMonitor_MachException.c#L319 https://github.com/kstenerud/KSCrash/blob/875de511c14bc2681b568c697fb5c8d84dc19a3a/Source/KSCrash/Recording/Monitors/KSCrashMonitor_MachException.c#L320

Before resume g_secondaryMachThread, exception ports has been restored. However, we are listen on g_exceptionPort after g_secondaryMachThread in resumed.

Any crash can be received here? https://github.com/kstenerud/KSCrash/blob/875de511c14bc2681b568c697fb5c8d84dc19a3a/Source/KSCrash/Recording/Monitors/KSCrashMonitor_MachException.c#L286

XjShi avatar Sep 10 '19 10:09 XjShi