Added the base exploitability module for windows. This only adds the very basic exception type based analysis for now.

BUG=NONE
TEST=MinidumpProcessorTest.TestExploitilityEngine

Review URL: http://breakpad.appspot.com/189001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@698 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
cdn@chromium.org
2010-09-22 02:37:19 +00:00
parent 9a57c16c97
commit cec12872c4
9 changed files with 288 additions and 32 deletions

View File

@@ -58,10 +58,10 @@ class MockMinidump : public Minidump {
MockMinidump() : Minidump("") {
}
MOCK_METHOD0(Read,bool());
MOCK_METHOD0(Read, bool());
MOCK_CONST_METHOD0(path, string());
MOCK_CONST_METHOD0(header,const MDRawHeader*());
MOCK_METHOD0(GetThreadList,MinidumpThreadList*());
MOCK_CONST_METHOD0(header, const MDRawHeader*());
MOCK_METHOD0(GetThreadList, MinidumpThreadList*());
};
}
@@ -179,7 +179,6 @@ class MockSymbolSupplier : public SymbolSupplier {
};
class MinidumpProcessorTest : public ::testing::Test {
};
TEST_F(MinidumpProcessorTest, TestCorruptMinidumps) {
@@ -257,9 +256,9 @@ TEST_F(MinidumpProcessorTest, TestExploitilityEngine) {
ASSERT_EQ(processor.Process(minidump_file, &state),
google_breakpad::PROCESS_OK);
// Test that exploitability module correctly fails to supply
// an engine for this platform
ASSERT_EQ(google_breakpad::EXPLOITABILITY_ERR_NOENGINE,
// Test that the supplied dump registers as HIGH. This dump demonstrates
// a write access violation to an address which is not near null.
ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH,
state.exploitability());
}
@@ -342,8 +341,7 @@ TEST_F(MinidumpProcessorTest, TestBasicProcessing) {
state.Clear();
supplier.set_interrupt(true);
ASSERT_EQ(processor.Process(minidump_file, &state),
google_breakpad::PROCESS_SYMBOL_SUPPLIER_INTERRUPTED
);
google_breakpad::PROCESS_SYMBOL_SUPPLIER_INTERRUPTED);
}
} // namespace