35 Commits

Author SHA1 Message Date
Ben Hamilton
8df174c64c [ios] Fix TSAN issue and Mach port leak in CrashpadClient
There were two issues with the iOS implementation of CrashpadClient
which I reported in https://crbug.com/crashpad/481:

1) TSAN found a data race in ResetForTesting() when it modified the
ScopedMachReceiveRight while the Mach exception port thread was
reading it

2) The Mach port connected to the exception server was never deallocated

This CL fixes both issues.

Change-Id: I5bd4f79ae6d0eccca954d663be7a36f8ceb0a0e8
Bug: https://crbug.com/crashpad/481
Bug: b:332305593
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5410301
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2024-04-11 17:00:05 +00:00
Avi Drissman
6a9e2e6003 Adjust to movement of base/ files to base/apple
This CL rolls mini_chromium to pick up the move of a bunch of files
to base/apple, and makes changes to adjust.

Bug: chromium:1444927
Change-Id: Ib692e2a1628e2c0c8228795eaecdb7f35b1c09fa
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4786387
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
2023-08-16 21:05:16 +00:00
Ben Hamilton
833219f1ad [ios] Add optional UploadBehavior enum to InProcessHandler::StartProcessingPendingReports()
Previously, StartProcessingPendingReports() only started the prune and
upload threads if it thought the application was actively running in
the foreground.

However, some Crashpad clients would like to replicate Breakpad's
behavior of allowing uploads while the application is starting up
(before it moves to the foreground).

This CL introdues an optional UploadBehavior enum to
InProcessHandler::StartProcessingPendingReports(), defaulting to the
current behavior of only uploading processed crash reports while the
application is in the foreground.

If the enum is set to UploadBehavior::kUploadImmediately, then
InProcessHandler will start the prune and upload threads regardless
of the application state. (If the application state later transitions
to a non-active state, then InProcessHandler will stop the prune and
upload threads as normal.)

Change-Id: I4f13f3a3006d636dd3e511b21ccc23a90b2ea639
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3894230
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
2022-09-15 20:16:25 +00:00
Ben Hamilton
ca3cf2f4e3 [ios] Add an optional upload complete observation callback to the in-process handler
Breakpad offers a callback when uploads complete:
    https://source.chromium.org/chromium/chromium/src/+/main:third_party/breakpad/breakpad/src/client/ios/BreakpadController.h;l=103;drc=1fc9cc0d0e1dfafb8d29dba8d01f09587d870026

This adds an equivalent observation callback to Crashpad on iOS which is invoked each time an upload attempt completes (whether it succeeds or fails).

I couldn't find any existing unit tests for the upload thread, but
I tested this manually by integrating it into a client. Please
let me know the best way to test this.

Change-Id: I17822af5e63c8634484606a6470ce83b2c385676
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3852399
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2022-09-12 23:08:02 +00:00
Mark Mentovai
6278690abe Update copyright boilerplate, 2022 edition (Crashpad)
sed -i '' -E -e 's/Copyright (.+) The Crashpad Authors\. All rights reserved\.$/Copyright \1 The Crashpad Authors/' $(git grep -El 'Copyright (.+) The Crashpad Authors\. All rights reserved\.$')

Bug: chromium:1098010
Change-Id: I8d6138469ddbe3d281a5d83f64cf918ec2491611
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3878262
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2022-09-06 23:54:07 +00:00
Ben Hamilton
b1ffe93562 [ios] Fix two shutdown races
There were two shutdown races in the iOS Crashpad client:

1) MachMessageServer::Run can return either MACH_RCV_PORT_CHANGED *or*
   MACH_RCV_INVALID_NAME based on the timing of when the port is
   closed, for example:
   c21f7bab5c/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift (L131)
2) The iOS crashpad::CrashHandler thread could read from its member
   variable mach_handler_running_ while another thread wrote to it

Change-Id: I696ece8575d9b88cbd0593e7c479bd4c7f863f45
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3651395
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-05-24 18:15:58 +00:00
Justin Cohen
8c7caef421 ios: Don't report preprocessed NSExceptions until the uncaught handler.
Change the ObjExceptionProcessor to write intermediate dumps to a
temporary location until they are confirmed by the
UncaughtExceptionHandler. Because the exception preprocessor uses
heuristics to detect iOS sinkholes, it's possible for an exception to
be identified as fatal, but not actual trigger the uncaught exception
handler. If the processor detects more than one fatal exception, it will
unregister itself and indicate this in the second dump with the key
'MultipleHandledUncaughtNSException'.

This changes also consolidates and simplifies some methods in the
InProcessHandler.

Change-Id: Ifc457e974d25f533b77cfd18b702129fdfb10a75
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3529968
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-03-25 22:35:58 +00:00
Justin Cohen
460dbdceae ios: Unblock all signals corresponding to Mach exceptions on crash.
https://crrev.com/c/3401563 introduced logic to guard the cached
intermediate dump writer from concurrent exceptions with a first
exception wins approach. To prevent the losing exception from returning
immediately and terminating the app before the dump is written, the
losing thread sleeps indefinitely. In the case where the losing
exception is from a call to abort() and the winning exception is a Mach
exception, the process will never terminate because abort() will first
block all signals on all other threads with a sigprocmask. This prevents
the kernel from delivering the signal converted from the Mach exception
and will never terminate. This effectively deadlocks the app.

Instead, unblock all signals corresponding to all Mach exceptions
Crashpad registers for before returning KERN_FAILURE.

Bug: crashpad:391
Change-Id: I96c357e98f09e65e70c67125a45b9b04075c2c06
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3518186
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-03-22 19:22:14 +00:00
Justin Cohen
785cb10e80 ios: Move IOSSystemDataCollector to InProcessHandler.
The IOSSystemDataCollector was previously owned by the iOS CrashHandler
and passed in to the iOS InProcessHandler in each method. Move
ownership to iOS InProcessHandler to simplify.

Change-Id: Ifa41304cb1e3e3825a211e6cce5aa730d0edcc95
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3517965
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-03-10 20:57:46 +00:00
Justin Cohen
12b35ebde8 ios: Add forbidden allocator to integration tests.
Override malloc_default_zone and malloc_default_purgeable_zone
with allocators that exit when called from the signal or Mach exception
threads in XCUITests, to verify the allocator is not used by the
InProcessHandler. Check stderr for error messages to confirm failures.

Change-Id: I1bb92e57504d71bbf6c6eaad3571c814e8a6934c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3488826
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-03-10 18:08:46 +00:00
Justin Cohen
3c4e37178d 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>
2022-03-10 18:05:16 +00:00
Daniel Cheng
0affe61689 Migrate base::{size,empty,data} to STL equivalents in crashpad.
Bug: chromium:1299695
Change-Id: I95187a425b08c96430c659f843c379d506972f0f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3496462
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2022-03-01 12:06:49 +00:00
Justin Cohen
55eb7a2eaf ios: Add ability to reset Crashpad client for iOS tests.
Change-Id: I83df67d77367ef01731bd9af015605cfa19e972e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3418581
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-02-02 17:50:04 +00:00
Justin Cohen
496d522cc4 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>
2022-01-21 04:33:37 +00:00
Ben Hamilton
1cf99ea4d2 [Crashpad/iOS] Harden CrashHandler against crashes during intermediate dump processing
https://crrev.com/c/3399252 fixed a heap overrun in iOS intermediate
dump processing.

This is a follow-up to that change to harden `CrashHandler` against
similar crashes:

1) Ensure the destructor of `ScopedAlternateWriter` is invoked
   to restore `InProcessHandler::writer_` state before processing
   the intermediate dump (otherwise, a signal raised by the intermediate
   dump handler would dereference the empty `std::unique_ptr` in
   `InProcessHandler::writer_`).

2) Harden `InProcessHandler` to check if `writer_` is empty before
   handling signals or exceptions

Change-Id: I1e63a496395b26681632302e8915b4433897037a
Bug: 391
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3401766
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2022-01-20 19:13:46 +00:00
Justin Cohen
d842c3c4c6 ios: Life of a crash report documentation.
Bug: crashpad: 31
Change-Id: Ic67aa0450cc273bd4088c494ed2656365b700198
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3234451
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
2021-10-28 21:50:19 +00:00
Justin Cohen
c367128a85 ios: Don't use POSIX file locks for iOS intermediate dumps.
Instead use a custom mechanism based on the filename. Rather than a
filename of <uuid>, instead name the file <bundle-id>|<uuid>[.locked].
A locked file will have the optional .locked extension. Files can be
unlocked after writing an intermediate dump, or during initialization by
looking for matching bundle-ids.

Clients that call ProcessIntermediateDumps() will clean up any leftover
locked intermediate dumps. Clients that never call
ProcessIntermediateDumps, such as extensions that leave this up to the
main application, will be cleaned up in a followup change.

Bug: crashpad:31
Change-Id: Icd4aaa3b79351870fbe9b8463cfbdf7cff7d5f87
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3229429
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
2021-10-19 18:23:51 +00:00
Justin Cohen
204abe16d2 ios: Add iOS in-process handler for managing minidump generation.
Manage the intermediate minidump generation, and own the crash report
upload thread and database.

Change-Id: I272d790a827cd13f6872e56f4675f366d13719c5
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3087721
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-10-14 15:16:02 +00:00
Peter Boström
1aa478d161 Remove DISALLOW_* macros in crashpad
This change was partially scripted and partially done manually with vim
regex + manually placing the deleted constructors.

The script change looked for destructors in the public: section of a
class, if that existed the deleted constructors would go before the
destructor.

For manual placement I looked for any constructor in the public: section
of the corresponding class. If there wasn't one, then it would ideally
have gone as the first entry except below enums, classes and typedefs.
This may not have been perfect, but is hopefully good enough. Fingers
crossed.

#include "base/macros.h" is removed from files that don't use
ignore_result, which is the only other thing defined in base/macros.h.

Bug: chromium:1010217
Change-Id: I099526255a40b1ac1264904b4ece2f3f503c9418
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3171034
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
2021-09-21 15:09:44 +00:00
Justin Cohen
e47918b80a ios: Move and update ObjcExceptionPreprocessor.
More cleanly integration the ObjExceptionPreprocessor with the
Crashpad client and in process handler, to record bought
'caught' and 'uncaught' NSExceptions.

Bug: crashpad: 31
Change-Id: I77a77ca6d893cdc74da476c1888d9bcb338339d8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2920851
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-08-11 16:41:53 +00:00
Justin Cohen
b8a1685773 ios: Correct typo in client API StartProcessingPendingReports.
Change-Id: Ibc40751a21ed884bde7ed592df20d7541762cba8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3031701
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-07-15 15:00:13 +00:00
Justin Cohen
202283a85c ios: Add API to DumpWithoutCrashAndDeferProcessingAtPath.
DumpWithoutCrashAndDeferProcessingAtPath(path) generate an intermediate
dump that can only be processed if ProcessIntermediateDump(file)
is called.  This means the client retains ownership of cleaning up the
intermediate dump if for whatever reason it is no longer needed.

This is useful for Chromium hang reports, which are speculatively
generated during a hang, but are later deleted if a hang recovers or if
the hang leads to an actual crash.

Bug: crashpad: 31
Change-Id: Ie424b375ceae3f5c0da320e766c990ea10df2f52
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3021668
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-07-15 12:21:12 +00:00
Justin Cohen
7f6f917aac ios: Migrate ios/snapshot to reading intermediate dumps.
Change-Id: Ib7715e642fa685a5f607239d07dcb68868cacb09
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2883523
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-05-26 19:36:05 +00:00
Lei Zhang
d8f60c8112 Swap from base/stl_util.h to cxx17_backports.h.
Chromium moved base::size() to base/cxx17_backports.h, so do the same in
mini_chromium and update the users in Crashpad.

Roll mini_chromium to 2f06f83f to make the new base header available.

Bug: chromium:1210983
Change-Id: Ie3dc4c189dcdfcac030b95fe285f94abb29a27bf
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2917779
Commit-Queue: Lei Zhang <thestig@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-05-25 21:44:52 +00:00
Justin Cohen
dc02980481 ios: Move system data collector to internal.
Also fixes a usage of ->assign in the class which will be unsafe to use.

Bug: crashpad:31
Change-Id: I434df35b0669dde2323817f3c0cef1727926c85f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2650088
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-03-29 16:59:37 +00:00
Justin Cohen
2dbd019bc2 ios: Add iOS crashpad overview documentation.
Adds an overview of the limitations of crashpad on the iOS platform,
including explanations of the in-process client and handler, and the
intermediate dump format used.

Bug: crashpad: 31
Change-Id: I1eb6add115570147e2de1be1002c5a4aa366184b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2706018
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-03-24 23:37:02 +00:00
Justin Cohen
b4bcc4df25 ios: Expose EnableUploading in CrashpadClient.
This method should be called when an application is ready to start
uploading any pending reports.

Bug: crashpad: 31
Change-Id: I70948fc4dfd8ee509d313b27a50fc4314baf5ce8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2698179
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-03-08 19:02:33 +00:00
Justin Cohen
87515bc2fa ios: Expose ProcessIntermediateDumps in CrashpadClient.
This method should be called when an application is ready to start
processing previously created intermediate dumps and begin uploading.
Processing will block, so this should not be called on the main UI
thread.

Bug: crashpad: 31
Change-Id: I31f81c68694cf18dd40e2994c0d6e7107c29e553
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2673024
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-02-04 04:35:40 +00:00
Justin Cohen
2cb83e491e ios: Cleanup API for chromium integration.
Bug: crashpad: 31
Change-Id: I9149879b2f6886ea17ca828dd60d37eb187ba88e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2665887
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-02-02 14:27:06 +00:00
Justin Cohen
17a515d33d [ios] Bring up first draft Mach exception server.
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>
2020-04-25 23:38:48 +00:00
Justin Cohen
b2fd7d5307 [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: 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>
2020-04-08 20:57:21 +00:00
Justin Cohen
faae6470cf [ios] Bring up first draft exceptions snapshot.
Gather most of the necessary information for the 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 thread_snapshot may end up in a
   different file completely, but until we pick a
   serialization/deserialization method, keep it as-is.

Bug: crashpad:31
Change-Id: Iae4af436cddabd2302689b76c8a4574eb8e48c0e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2098744
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-03-25 20:36:06 +00:00
Justin Cohen
d9c1ca1216 [ios] Bring up first draft system snapshot and iOS data collector.
Gather most of the necessary information for the system 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 thread_snapshot may end up in a
   different file completely, but until we pick a
   serialization/deserialization method, keep it as-is.

Bug: crashpad:31
Change-Id: Iac82491fdb4a823163f02149f52a1e18e26fa9de
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2090173
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-03-25 20:31:06 +00:00
Justin Cohen
b109e4ce38 [ios] Bring up first draft process and module snapshot.
Gather most of the necessary information for the module 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 module_snapshot may end up in a
   different file completely, but until we pick a
   serialization/deserialization method, keep it in module_snapshot_ios.

Change-Id: Ie80c739c167634520d13ec920a29a80116aa3bfe
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2079196
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-03-05 15:42:35 +00:00
Justin Cohen
9ed8290547 Bring up skeleton crashpad_client_ios.
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>
2020-02-18 20:03:41 +00:00