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
This commit is contained in:
nealsid 2010-06-04 16:59:23 +00:00
parent c0fc538ae4
commit 4f182c746b
2 changed files with 28 additions and 1 deletions

View file

@ -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 */

View file

@ -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;