Adds fastfail subcodes as distinct failure reasons

Previously these all resulted in EXCEPTION_STACK_BUFFER_OVERRUN
but this hides various specific fast fail crash types, which
are now provided based on the exception's subcode.

Tests: added to minidump_process_unittest.cc
Bug: 865632
Change-Id: Ic6693de247da55cf6d132d108c6e20c635f366b1
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3771437
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
Alex Gough
2022-07-19 05:23:55 -07:00
committed by Robert Sesek
parent 335e61656f
commit e467c59c68
4 changed files with 303 additions and 1 deletions

View File

@@ -784,6 +784,22 @@ TEST_F(MinidumpProcessorTest, TestXStateAmd64ContextMinidump) {
// breakpad.
}
TEST_F(MinidumpProcessorTest, TestFastFailException) {
// This tests if we can understand fastfail exception subcodes.
// Dump is captured from a toy executable and is readable by windbg.
MinidumpProcessor processor(nullptr, nullptr /*&supplier, &resolver*/);
string minidump_file = GetTestDataPath()
+ "tiny-exe-fastfail.dmp";
ProcessState state;
ASSERT_EQ(processor.Process(minidump_file, &state),
google_breakpad::PROCESS_OK);
ASSERT_TRUE(state.crashed());
ASSERT_EQ(state.threads()->size(), size_t(4));
ASSERT_EQ(state.crash_reason(), "FAST_FAIL_FATAL_APP_EXIT");
}
} // namespace
int main(int argc, char* argv[]) {