mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
ios: Add comment explaining why iOS only installs a SIGABRT handler.
xnu turns hardware faults into Mach exceptions, so the only signal left to register is SIGABRT, which never starts off as a hardware fault. Installing a handler for other signals would lead to recording exceptions twice. As a consequence, Crashpad will not generate intermediate dumps for anything manually calling raise(SIG*). In practice, this doesn’t actually happen for crash signals that originate as hardware faults. Change-Id: I1be669d10e89b8e8ebcc69cfdf79c1ee20c96f76 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3403042 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Justin Cohen <justincohen@chromium.org>
This commit is contained in:
parent
b25b523d30
commit
496d522cc4
@ -71,6 +71,13 @@ class CrashHandler : public Thread,
|
||||
if (!in_process_handler_.Initialize(
|
||||
database, url, annotations, system_data_) ||
|
||||
!InstallMachExceptionHandler() ||
|
||||
// xnu turns hardware faults into Mach exceptions, so the only signal
|
||||
// left to register is SIGABRT, which never starts off as a hardware
|
||||
// fault. Installing a handler for other signals would lead to
|
||||
// recording exceptions twice. As a consequence, Crashpad will not
|
||||
// generate intermediate dumps for anything manually calling
|
||||
// raise(SIG*). In practice, this doesn’t actually happen for crash
|
||||
// signals that originate as hardware faults.
|
||||
!Signals::InstallHandler(SIGABRT, CatchSignal, 0, &old_action_)) {
|
||||
LOG(ERROR) << "Unable to initialize Crashpad.";
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user