Closed h3r2tic closed 5 months ago
FYI we've had an VEH catching STATUS_HEAP_CORRUPTION
exceptions in Firefox for a while, but several times the handler itself hits another crash before being able to process it. You might want a Windows Error Reporting runtime exception module to catch those "the world is on fire" crashes instead. We have one (see this and this) but it requires building and installing a separate DLL (plus registry modifications) so it might not be suitable for all projects. On the upside it can also catch FAST_FAIL_*
exceptions which cannot be caught with VEH/SEH.
Oooh, thanks for chiming in, @gabrielesvelto 💕 That's great to know for when we hear of silent crashes again 😅
Checklist
Description of Changes
We've been using
crash-handler
in Tiny Glade, and noticed a few quiet crashes, where our crash reporter had nothing to say. I suspect those are heap corruptions (in graphics drivers or DLLs that inject themselves into our app). Windows will not call the unhandled exception filter for those.This PR adds a vectored exception handler that gets to act first. VEH is only used to process heap corruptions in this PR, allowing the unhandled exception filter to process the rest.
Disclaimer: I have no idea what I'm doing, but it catches an intentional heap corruption in my test. Here's the heap corruption code (source), for science of course: