diff --git a/src/google_breakpad/common/minidump_exception_win32.h b/src/google_breakpad/common/minidump_exception_win32.h index f052401c..85eb598d 100644 --- a/src/google_breakpad/common/minidump_exception_win32.h +++ b/src/google_breakpad/common/minidump_exception_win32.h @@ -96,6 +96,10 @@ typedef enum { /* EXCEPTION_STACK_OVERFLOW */ MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK = 0xc0000194, /* EXCEPTION_POSSIBLE_DEADLOCK */ + MD_EXCEPTION_CODE_WIN_STACK_BUFFER_OVERRUN = 0xc0000409, + /* STATUS_STACK_BUFFER_OVERRUN */ + MD_EXCEPTION_CODE_WIN_HEAP_CORRUPTION = 0xc0000374, + /* STATUS_HEAP_CORRUPTION */ MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION = 0xe06d7363 /* Per http://support.microsoft.com/kb/185294, generated by Visual C++ compiler */ diff --git a/src/processor/minidump_processor.cc b/src/processor/minidump_processor.cc index e2b5bd3d..e1583f49 100644 --- a/src/processor/minidump_processor.cc +++ b/src/processor/minidump_processor.cc @@ -703,7 +703,24 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { // data. // This information is useful in addition to the code address, which // will be present in the crash thread's instruction field anyway. - reason = "EXCEPTION_ACCESS_VIOLATION"; + if (raw_exception->exception_record.number_parameters >= 1) { + switch (raw_exception->exception_record.exception_information[0]) { + case 0: + reason = "EXCEPTION_ACCESS_VIOLATION_READ"; + break; + case 1: + reason = "EXCEPTION_ACCESS_VIOLATION_WRITE"; + break; + case 8: + reason = "EXCEPTION_ACCESS_VIOLATION_EXEC"; + break; + default: + reason = "EXCEPTION_ACCESS_VIOLATION"; + break; + } + } else { + reason = "EXCEPTION_ACCESS_VIOLATION"; + } if (address && raw_exception->exception_record.number_parameters >= 2) { *address = @@ -764,6 +781,12 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { case MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK: reason = "EXCEPTION_POSSIBLE_DEADLOCK"; break; + case MD_EXCEPTION_CODE_WIN_STACK_BUFFER_OVERRUN: + reason = "EXCEPTION_STACK_BUFFER_OVERRUN"; + break; + case MD_EXCEPTION_CODE_WIN_HEAP_CORRUPTION: + reason = "EXCEPTION_HEAP_CORRUPTION"; + break; case MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION: reason = "Unhandled C++ Exception"; break;