From 58d557dc6457b0aca52b0e2f67bb540ad4f15840 Mon Sep 17 00:00:00 2001 From: slipstream/RoL Date: Tue, 17 Jan 2017 21:32:16 +0000 Subject: [PATCH] Crash dumps now only made if 86box is actually about to crash --- src/win-crashdump.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/win-crashdump.c b/src/win-crashdump.c index 1220afde0..af01408e2 100644 --- a/src/win-crashdump.c +++ b/src/win-crashdump.c @@ -19,6 +19,12 @@ LONG CALLBACK MakeCrashDump(PEXCEPTION_POINTERS ExceptionInfo) { // Win32-specific functions will be used wherever possible, just in case the C stdlib-equivalents try to allocate memory. // (The Win32-specific functions are generally just wrappers over NT system calls anyway.) + if ((ExceptionInfo->ExceptionRecord->ExceptionCode >> 28) != 0xC) { + // The exception code is not a fatal exception (highest 4 bits of ntstatus = 0xC) + // Not going to crash, let's not make a crash dump + return EXCEPTION_CONTINUE_SEARCH; + } + // So, the program is about to crash. Oh no what do? // Let's create a crash dump file as a debugging-aid.