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:
Mark Brand 2022-10-07 10:44:20 +02:00 committed by Ivan Penkov
parent 6289830b67
commit 57d1743662
4 changed files with 110 additions and 4 deletions

View file

@ -101,8 +101,10 @@ class MinidumpProcessor {
// exception, if this information is available. This will be a code
// address when the crash was caused by problems such as illegal
// instructions or divisions by zero, or a data address when the crash
// was caused by a memory access violation.
static string GetCrashReason(Minidump* dump, uint64_t* address);
// was caused by a memory access violation. If enable_objdump is set, this
// may use disassembly to compute the faulting address.
static string GetCrashReason(Minidump* dump, uint64_t* address,
bool enable_objdump);
// This function returns true if the passed-in error code is
// something unrecoverable(i.e. retry should not happen). For