Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(950)

Unified Diff: snapshot/mac/exception_snapshot_mac.cc

Issue 1056113002: EXC_CRASH should never be wrapped in another EXC_CRASH (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/mac/exception_snapshot_mac.cc
diff --git a/snapshot/mac/exception_snapshot_mac.cc b/snapshot/mac/exception_snapshot_mac.cc
index 9a9703a2d287a87d90967399daf19ca48691e21d..8f5bb20fe7e353e8219497e38c261369798c8350 100644
--- a/snapshot/mac/exception_snapshot_mac.cc
+++ b/snapshot/mac/exception_snapshot_mac.cc
@@ -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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698