Skip to content

Commit

Permalink
Updated to latest /dev, restricted caught exceptions
Browse files Browse the repository at this point in the history
Rebased to current /dev
Made the fix a bit safer by only catching EXCEPTION_ACCESS_VIOLATION, at the risk of not getting crahs dumps/logs for a few obscure and infrequest crash types. This is consistent with when crash dumps were triggered before this PR.
  • Loading branch information
rfortier committed Sep 30, 2024
1 parent ebc5c2d commit 33c0c07
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Code/client/CrashHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ LONG WINAPI VectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo)
const std::lock_guard lock{singleThreaded};

// Check for severe, not continuable and not software-originated exception
if (pExceptionInfo->ExceptionRecord->ExceptionCode >= 0x80000000 &&
pExceptionInfo->ExceptionRecord->ExceptionCode != 0xE06D7363 && // Sigh. C++ exceptions forgot the SOFTWARE_ORIGINATE flag.
(pExceptionInfo->ExceptionRecord->ExceptionFlags & EXCEPTION_SOFTWARE_ORIGINATE) == 0 &&
if (pExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION &&
alreadyCrashed++ == 0)
{
spdlog::critical (__FUNCTION__ ": crash occurred!");
Expand Down

0 comments on commit 33c0c07

Please sign in to comment.