diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-10-25 11:19:27 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-10-25 11:19:27 +1100 |
commit | c2b9f5ac078379090f64f9d8840960555c79e22d (patch) | |
tree | 6587720a0ec4d5c4064b8cdb4e0d14e368cee5d5 /source/core/StarSignalHandler_windows.cpp | |
parent | 15d116b7eac53f1d0526aa80ab9d59b89661b128 (diff) |
Only create a dump on stack overflow
Diffstat (limited to 'source/core/StarSignalHandler_windows.cpp')
-rw-r--r-- | source/core/StarSignalHandler_windows.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/core/StarSignalHandler_windows.cpp b/source/core/StarSignalHandler_windows.cpp index 2b27467..676734c 100644 --- a/source/core/StarSignalHandler_windows.cpp +++ b/source/core/StarSignalHandler_windows.cpp @@ -122,8 +122,11 @@ struct SignalHandlerImpl { } static LONG CALLBACK vectoredExceptionHandler(PEXCEPTION_POINTERS ExceptionInfo) { - auto thread = CreateThread(NULL, 0, writeMiniDump, (void*)ExceptionInfo, 0, NULL); + HANDLE thread = NULL; LONG result = EXCEPTION_CONTINUE_SEARCH; + if (ExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_STACK_OVERFLOW) { + thread = CreateThread(NULL, 0, writeMiniDump, (void*)ExceptionInfo, 0, NULL); + } if (ExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) { handleFatalError("Access violation detected", ExceptionInfo); result = EXCEPTION_CONTINUE_EXECUTION; |