From 4f182c746bccc64a141cd4bbda4d3d901ef013ce Mon Sep 17 00:00:00 2001 From: nealsid Date: Fri, 4 Jun 2010 16:59:23 +0000 Subject: [PATCH] Add access violation detail for windows (read/write/dep). Add stack buffer overrun and heap corruption exceptions for windows. Additional detail requested to improve Chrome crash analysis A=cdn R=nealsid http://codereview.chromium.org/2429003/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@606 4c0a9323-5329-0410-9bdc-e9ce6186880e --- .../common/minidump_exception_win32.h | 4 +++ src/processor/minidump_processor.cc | 25 ++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) 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;