commit | 3c4e37178d4b8fe3d97260dee0be7afd6bb581ad | [log] [tgz] |
---|---|---|
author | Justin Cohen <justincohen@google.com> | Tue Mar 08 23:20:41 2022 |
committer | Crashpad LUCI CQ <crashpad-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Mar 10 18:05:16 2022 |
tree | 23959a0768c247f65dab3392006e22aa3b84e09c | |
parent | 13202c2ffe4b02303c721bb2f6e8efda1999aa1e [diff] |
ios: Fix up concurrency in DumpWithoutCrashing and exception handling. Change signal, uncaught NSExceptions and Mach exception handlers to prevent re-entrancy with a first-exception-wins approach to prevent concurrent exceptions from trying to use the same cached intermediate dump writer. Uses compare-and-swap to either return early for reentrant signals or to wait indefinitely for anything after the first fatal exception. Change the NSException handler generated from the Objective-C exception preprocessor to not used the cached intermediate dump writer and not use the same first-exception-wins logic. This is useful because the Objective-C exception preprocessor is imperfect and may generate intermediate dumps that are not followed by process termination. Simplify DumpWithoutCrashing's ownership of its intermediate dump writer to be thread safe. Set a handler for SIGPIPE for applications that haven't already ignored or set a handler for SIGPIPE. Bug: crashpad:391 Change-Id: Ia8ae61d50be81910fa0af40325300441d9dc01b6 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3401563 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Commit-Queue: Justin Cohen <justincohen@chromium.org>
Crashpad is a crash-reporting system.
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.