mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
EXC_CRASH should never be wrapped in another EXC_CRASH.
R=rsesek@chromium.org Review URL: https://codereview.chromium.org/1056113002
This commit is contained in:
parent
e1347a740c
commit
678baca8bd
@ -66,17 +66,20 @@ bool ExceptionSnapshotMac::Initialize(ProcessReader* process_reader,
|
||||
exception_ = ExcCrashRecoverOriginalException(
|
||||
exception_code_0, &exception_code_0, nullptr);
|
||||
|
||||
if (exception_ == EXC_RESOURCE || exception_ == EXC_GUARD) {
|
||||
// These are software exceptions that are never mapped to EXC_CRASH. The
|
||||
// only time EXC_CRASH is generated is for processes exiting due to an
|
||||
// unhandled core-generating signal or being killed by SIGKILL for
|
||||
// code-signing reasons. Neither of these applies to EXC_RESOURCE or
|
||||
// EXC_GUARD. See 10.10 xnu-2782.1.97/bsd/kern/kern_exit.c
|
||||
// proc_prepareexit().
|
||||
if (exception_ == EXC_CRASH ||
|
||||
exception_ == EXC_RESOURCE ||
|
||||
exception_ == EXC_GUARD) {
|
||||
// EXC_CRASH should never be wrapped in another EXC_CRASH.
|
||||
//
|
||||
// Receiving these exception types wrapped in EXC_CRASH would lose
|
||||
// information because their code[0] uses all 64 bits (see below) and the
|
||||
// code[0] recovered from EXC_CRASH only contains 20 significant bits.
|
||||
// EXC_RESOURCE and EXC_GUARD are software exceptions that are never
|
||||
// wrapped in EXC_CRASH. The only time EXC_CRASH is generated is for
|
||||
// processes exiting due to an unhandled core-generating signal or being
|
||||
// killed by SIGKILL for code-signing reasons. Neither of these applies to
|
||||
// EXC_RESOURCE or EXC_GUARD. See 10.10 xnu-2782.1.97/bsd/kern/kern_exit.c
|
||||
// proc_prepareexit(). Receiving these exception types wrapped in
|
||||
// EXC_CRASH would lose information because their code[0] uses all 64 bits
|
||||
// (see below) and the code[0] recovered from EXC_CRASH only contains 20
|
||||
// significant bits.
|
||||
LOG(WARNING) << base::StringPrintf(
|
||||
"exception %s invalid in EXC_CRASH",
|
||||
ExceptionToString(exception_, kUseFullName | kUnknownIsNumeric)
|
||||
|
Loading…
x
Reference in New Issue
Block a user