aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu.andrew.x@gmail.com <Liu.andrew.x@gmail.com>2015-07-07 21:30:06 +0000
committerLiu.andrew.x@gmail.com <Liu.andrew.x@gmail.com>2015-07-07 21:30:06 +0000
commitfed2e33bd135604d426fca5cd58135772237ca34 (patch)
tree58f062d11362aa5e71cf9bebca9797770ec810ce
parentUse general instruction/stack pointer convenience method instead of manually (diff)
downloadbreakpad-fed2e33bd135604d426fca5cd58135772237ca34.tar.xz
Set exception whitelist check as earlier check instead of last check.
When I first added the exception whitelist, I meant to put the check before checking the location of the instruction pointer. (I didn't notice that it was after the other check until now.) The whitelist check is to quickly rule out minidumps, and if checking the instruction pointer provided any useful information, it would be pretty indicative that the exception causing the dump is interesting. R=ivanpe@chromium.org Review URL: https://codereview.chromium.org/1211253009 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1469 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r--src/processor/exploitability_linux.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/processor/exploitability_linux.cc b/src/processor/exploitability_linux.cc
index b5dc0e87..1b6aabf0 100644
--- a/src/processor/exploitability_linux.cc
+++ b/src/processor/exploitability_linux.cc
@@ -82,16 +82,27 @@ ExploitabilityRating ExploitabilityLinux::CheckPlatformExploitability() {
}
}
- // Check if the instruction pointer is in a valid instruction region
- // by finding if it maps to an executable part of memory.
- uint64_t instruction_ptr = 0;
-
// Getting exception data. (It should exist for all minidumps.)
MinidumpException *exception = dump_->GetException();
if (exception == NULL) {
BPLOG(INFO) << "No exception record.";
return EXPLOITABILITY_ERR_PROCESSING;
}
+ const MDRawExceptionStream *raw_exception_stream = exception->exception();
+ if (raw_exception_stream == NULL) {
+ BPLOG(INFO) << "No raw exception stream.";
+ return EXPLOITABILITY_ERR_PROCESSING;
+ }
+
+ // Checking for benign exceptions that caused the crash.
+ if (this->BenignCrashTrigger(raw_exception_stream)) {
+ return EXPLOITABILITY_NONE;
+ }
+
+ // Check if the instruction pointer is in a valid instruction region
+ // by finding if it maps to an executable part of memory.
+ uint64_t instruction_ptr = 0;
+
const MinidumpContext *context = exception->GetContext();
if (context == NULL) {
BPLOG(INFO) << "No exception context.";
@@ -108,17 +119,6 @@ ExploitabilityRating ExploitabilityLinux::CheckPlatformExploitability() {
return EXPLOITABILITY_HIGH;
}
- const MDRawExceptionStream *raw_exception_stream = exception->exception();
- if (raw_exception_stream == NULL) {
- BPLOG(INFO) << "No raw exception stream.";
- return EXPLOITABILITY_ERR_PROCESSING;
- }
-
- // Checking for benign exceptions that caused the crash.
- if (this->BenignCrashTrigger(raw_exception_stream)) {
- return EXPLOITABILITY_NONE;
- }
-
return EXPLOITABILITY_INTERESTING;
}