commit | 6c946c25b922dc0b10f7a0c47182a0f76385eabb | [log] [tgz] |
---|---|---|
author | Justin Cohen <justincohen@google.com> | Wed Apr 08 15:37:55 2020 -0400 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Jan 19 06:50:03 2021 -0800 |
tree | 7f36dd5456fb9bcf5f7891ca91e712527099288c | |
parent | d4949821a2ca6ce9dcea76418721c608214fa0a9 [diff] |
[ios] Bring up first half of UncaughtExceptionHandler. When code raises an Objective-C exception, unwind the stack looking for any exception handlers. If an exception handler is encountered, test to see if it is a function known to be a catch-and-rethrow 'sinkhole' exception handler. Various routines in UIKit and elsewhere do this, and they obscure the exception stack, since the original throw location is no longer present on the stack (just the re-throw) when Crashpad captures the crash report. In the case of sinkholes, trigger an immediate exception to capture the original stack. The is an improvement over the alternative, NSSetUncaughtExceptionHandler, which passes along the stack frames, but not the stack memory contents and full exception context itself. The details of what happens after a fatal exception is triggered are unresolved in this CL. For now, simply call std::terminate. This code was inspired by chromium/src/chrome/browser/mac/ exception_processor.mm. Bug: crashpad:31 Change-Id: Ife4c7c6d50e6a657c3a01d6b49f7fc50e21ba759 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2125254 Commit-Queue: Justin Cohen <justincohen@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> GitOrigin-RevId: b2fd7d5307b083613469c29c09c5710265f47a91
Crashpad is a crash-reporting system.
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.