From 8f6b2527224794dd284aafbdda7fb8a232d4204e Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 26 Jul 2023 18:41:18 -0700 Subject: [PATCH] Add support for new SEGV_* constants to minidump_stackwalk. Bug: chromium:1137393 Change-Id: I1a6a5f2013e6a08e189958b89415183ffb6fe345 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4722972 Reviewed-by: Mark Mentovai --- .../common/minidump_exception_linux.h | 5 +++++ src/processor/minidump_processor.cc | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/google_breakpad/common/minidump_exception_linux.h b/src/google_breakpad/common/minidump_exception_linux.h index 354cdd6b..2135244f 100644 --- a/src/google_breakpad/common/minidump_exception_linux.h +++ b/src/google_breakpad/common/minidump_exception_linux.h @@ -112,6 +112,11 @@ typedef enum { MD_EXCEPTION_FLAG_LIN_SEGV_ACCERR = 2, MD_EXCEPTION_FLAG_LIN_SEGV_BNDERR = 3, MD_EXCEPTION_FLAG_LIN_SEGV_PKUERR = 4, + MD_EXCEPTION_FLAG_LIN_SEGV_ACCADI = 5, + MD_EXCEPTION_FLAG_LIN_SEGV_ADIDERR = 6, + MD_EXCEPTION_FLAG_LIN_SEGV_ADIPERR = 7, + MD_EXCEPTION_FLAG_LIN_SEGV_MTEAERR = 8, + MD_EXCEPTION_FLAG_LIN_SEGV_MTESERR = 9, /* SIGBUS */ MD_EXCEPTION_FLAG_LIN_BUS_ADRALN = 1, diff --git a/src/processor/minidump_processor.cc b/src/processor/minidump_processor.cc index f412af64..5d2dea6d 100644 --- a/src/processor/minidump_processor.cc +++ b/src/processor/minidump_processor.cc @@ -1798,6 +1798,21 @@ string MinidumpProcessor::GetCrashReason(Minidump* dump, uint64_t* address, case MD_EXCEPTION_FLAG_LIN_SEGV_PKUERR: reason.append("SEGV_PKUERR"); break; + case MD_EXCEPTION_FLAG_LIN_SEGV_ACCADI: + reason.append("SEGV_ACCADI"); + break; + case MD_EXCEPTION_FLAG_LIN_SEGV_ADIDERR: + reason.append("SEGV_ADIDERR"); + break; + case MD_EXCEPTION_FLAG_LIN_SEGV_ADIPERR: + reason.append("SEGV_ADIPERR"); + break; + case MD_EXCEPTION_FLAG_LIN_SEGV_MTEAERR: + reason.append("SEGV_MTEAERR"); + break; + case MD_EXCEPTION_FLAG_LIN_SEGV_MTESERR: + reason.append("SEGV_MTESERR"); + break; default: reason.append(flags_string); BPLOG(INFO) << "Unknown exception reason " << reason;