Add Mach exception server and fill out exceptions snapshot.
Note that:
- The 'capture' portion of this CL will be moved out of the snapshot
interface and into a separate in-process dump to disk location.
- All of the pointer dereferences need to be wrapped in vm_read.
- The read-fast-and-dump logic in exception_snapshot will end up in a
different file completely, but until we pick a
serialization/deserialization method, keep it as-is.
Bug: crashpad:31
Change-Id: I44203aa44036a341d6b4517fde7ab0cb9d7e94d7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2160122
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Re:
https://chromium-review.googlesource.com/c/2028183/4/test/ios/crash_type_xctest.mm#13
We previously discussed using the CP prefix for Objective-C class and
protocol names, and CPTest for those restricted to tests. This is
intended to parallel our C++ code’s use of the crashpad and
crashpad::test namespaces, but with name prefixing because Objective-C
doesn’t support any other form of namespacing.
These class names are changed:
ApplicationDelegate→CPTestApplicationDelegate
CrashViewController→CPTestCrashViewController
CrashpadUnitTestDelegate→CPTestUnitTestApplicationDelegate
Filenames and #include guards are also adjusted to match.
This also has include-what-you-use fixes and more modern pointer
handling in CPTestSharedObject, which was already named correctly.
Bug: crashpad:31
Change-Id: I3645ee830a30eccb594d679e0d52ba1a2dd1225d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2144453
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
- Fix -Wundeclared-selector in Chromium roll.
- Convert TEST to TEST_F in crashpad_client_ios_test.mm
Also rolls mini_chromim 731e08f06..641fcf9bb (3 commits)
2020-04-14 mark Mark static const class/struct members as constexpr
2020-04-09 justincohen Add PlatformTest to mini_chromium.
2020-04-09 jperaza Replace ScopedClearErrno with ScopedClearLastError
Change-Id: Ib8ac742eb97359be47e1ff01ae6f10518761a302
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2144452
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
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: Ieebc6476a0507c466c8219c10f790ec0a624e58c
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>
First steps at bringing up the crashpad_client on iOS. Also updates
the XCUITest to trigger various crashes, with some swizzling
necessary to allow crashes.
Change-Id: I87dd36bed1c052b509d14bfa29679ed81e58a377
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2039470
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Using XCTest allows us to drive tests from the commandline via
xcodebuild, and it also simplifies running tests on physical devices.
Tests put themselves into "XCTest-mode" if the
"XCTestConfigurationFilePath" environment variable is present. This
variable is only set when XCTests are running.
Change-Id: If55199a7470f0479f107097eef1dfb1a705015e9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2033427
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>