mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-02-19 08:42:59 +00:00
Fixup non-canonical fault addresses for amd64.
This uses DisassemblerObjdump to add a processing step in MinidumpProcessor to compute the true faulting address from register state and disassembly of the fault instruction when the fault address is suspicious (-1). Bug: 901847 Change-Id: Ia1f77d542c4055c82ce2504db8c84a9e52001866 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3932957 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
@@ -799,6 +799,25 @@ TEST_F(MinidumpProcessorTest, TestFastFailException) {
|
||||
ASSERT_EQ(state.crash_reason(), "FAST_FAIL_FATAL_APP_EXIT");
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
TEST_F(MinidumpProcessorTest, TestNonCanonicalAddress) {
|
||||
// This tests if we can correctly fixup non-canonical address GPF fault
|
||||
// addresses.
|
||||
// Dump is captured from a toy executable and is readable by windbg.
|
||||
MinidumpProcessor processor(nullptr, nullptr /*&supplier, &resolver*/);
|
||||
processor.set_enable_objdump(true);
|
||||
|
||||
string minidump_file = GetTestDataPath()
|
||||
+ "write_av_non_canonical.dmp";
|
||||
|
||||
ProcessState state;
|
||||
ASSERT_EQ(processor.Process(minidump_file, &state),
|
||||
google_breakpad::PROCESS_OK);
|
||||
ASSERT_TRUE(state.crashed());
|
||||
ASSERT_EQ(state.crash_address(), 0xfefefefefefefefeU);
|
||||
}
|
||||
#endif // __linux__
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
Reference in New Issue
Block a user