mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 19:36:45 +02:00
Heap corruption crashes CR
This commit is contained in:
parent
f2c471558c
commit
0804abcca6
1 changed files with 3 additions and 17 deletions
|
@ -40,27 +40,13 @@ extern QString qAppFileName();
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
LONG WINAPI vectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo) {
|
LONG WINAPI vectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo) {
|
||||||
static const DWORD EXTERNAL_EXCEPTION_CODE{ 0xe06d7363 };
|
if (pExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_HEAP_CORRUPTION ||
|
||||||
static const DWORD HEAP_CORRUPTION_CODE{ 0xc0000374 };
|
pExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_STACK_BUFFER_OVERRUN) {
|
||||||
|
|
||||||
auto exceptionCode = pExceptionInfo->ExceptionRecord->ExceptionCode;
|
|
||||||
if (exceptionCode == EXTERNAL_EXCEPTION_CODE) {
|
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (exceptionCode == HEAP_CORRUPTION_CODE) {
|
|
||||||
qCritical() << "VectoredExceptionHandler: Heap corruption:" << QString::number(exceptionCode, 16);
|
|
||||||
|
|
||||||
CrashpadClient client;
|
CrashpadClient client;
|
||||||
if (gIPCPipe.length()) {
|
if (gIPCPipe.length()) {
|
||||||
bool rc = client.SetHandlerIPCPipe(gIPCPipe);
|
client.SetHandlerIPCPipe(gIPCPipe);
|
||||||
qCritical() << "SetHandlerIPCPipe = " << rc;
|
|
||||||
} else {
|
|
||||||
qCritical() << "No IPC Pipe was previously defined for crash handler.";
|
|
||||||
}
|
}
|
||||||
qCritical() << "Calling DumpAndCrash()";
|
|
||||||
client.DumpAndCrash(pExceptionInfo);
|
client.DumpAndCrash(pExceptionInfo);
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
return EXCEPTION_CONTINUE_SEARCH;
|
||||||
|
|
Loading…
Reference in a new issue