2205 Commits

Author SHA1 Message Date
Andrii Shyshkalov
4318922c9a [luci][realms] switch crashpad to LUCI security realms.
R=jperaza@chromium.org

Bug: chromium:1242890
Change-Id: I6b7a05806c27827fce213804348c84273ba21e7a
No-Try: True
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3197578
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-10-01 18:36:39 +00:00
Joshua Peraza
3b71fc85b1 Config LUCI with lucicfg
Change-Id: I0cff5fe7eaf1b8a26857651b617f668eefd3b553
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3192690
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-10-01 18:31:46 +00:00
Nathan Mulcahey
00b93a1772 [fuchsia] Move third_party/lss source location.
Fuchsia is unnesting third_party dependencies to be in a flat structure
in preperation for migrating to git submodules.

Bug: b/189352193
Change-Id: I308bfc1db43eb308b89e2bfca8b4f6abf7177d80
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3179766
Commit-Queue: Francois Rousseau <frousseau@google.com>
Reviewed-by: Francois Rousseau <frousseau@google.com>
2021-09-27 22:48:53 +00:00
Peter Boström
be2a8a47c1 Roll mini_chromium into crashpad
This brings in the removal of DISALLOW_ macros from crashpad's
base/macros.h.

Bug: chromium:1010217
Change-Id: Ieae1ad702be54fda7069fa72efe7d39b81a96d04
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3173473
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-09-21 19:52:50 +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
Tamir Duberstein
5e43f1ed0a Remove fuchsia.net.NameLookup
This protocol is replaced with fuchsia.net.name.Lookup.

Bug: 1231266
Change-Id: I77c90ad8df03fa14c2a00aa819a7dd7b764c5fd6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3136173
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-09-01 16:50:41 +00:00
Dangyi Liu
8940d63dfc Disable mac specific features when in Fuchsia tree
Because Fuchsia's fork deleted apple_cf for license compliance.

Bug: fuchsia:66116
Change-Id: Iecdbc005799bdf6a4d0d3433d63e8040f28621cf
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3120806
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2021-08-27 22:34:46 +00:00
David Fang
29e30d04c8 [fuchsia][reland] new location of mini_chromium
This reverts commit e0785f6c3f15658f51dc31aa7557ebe25af3acb1.
This is a re-roll forward of 3676b715cf3acc4edeb61e113a1e7983573c75ca.

Change-Id: Ida493946de9a705034d7233366bb8644d60d071e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3114093
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-08-26 23:13:51 +00:00
Mark Mentovai
e0785f6c3f Revert "[fuchsia] point to new location of mini_chromium"
This reverts commit 3676b715cf3acc4edeb61e113a1e7983573c75ca.

Reason for revert: By request of fangism: “We have an atomic change
problem and will need to re-roll this forward at a later date.”

Original change's description:
> [fuchsia] point to new location of mini_chromium
>
> Change-Id: I8aca564eeb3b579484048757e5da45bf0d25fc21
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3089504
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Mark Mentovai <mark@chromium.org>

Change-Id: I1da123cd479e59029e267933ecc11451ddac3639
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3104906
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2021-08-19 01:04:25 +00:00
David Fang
3676b715cf [fuchsia] point to new location of mini_chromium
Change-Id: I8aca564eeb3b579484048757e5da45bf0d25fc21
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3089504
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2021-08-12 01:28:21 +00:00
Justin Cohen
40cd1b72cf ios: Migrate ios/snapshot to writing intermediate dumps.
This migrates all the logic that used to live in ios/snapshots that
gathers all the various information during an exception.

Everything in InProcessIntermediateDumpHandler is considered
`RUNS-DURING-CRASH`.

Change-Id: Icc47c9de0f66be2b14a46a13d1038176082a3218
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2920547
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-08-11 17:52:56 +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
Joshua Peraza
1db7e2b547 Avoid use of UMA_HISTOGRAM_COUNTS
UMA_HISTOGRAM_COUNTS is documented as deprecated and defaults to
creating larger histograms than are needed by Crashpad.

Bug: chromium:1237013
Change-Id: Ic133e05bce41759a11dbb523d84afc5246c6dc37
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3075884
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-08-11 16:35:54 +00:00
Justin Cohen
7451893cd8 ios: Fix MissingIntermediateDumpKey and InvalidIntermediateDumpKeySize histogram.
The actual number of enums that will be recorded is approx ~75.

Bug: crashpad: 31
Change-Id: If33671c7627d6e55e94c86308c8482711e33cef4
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3035823
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-08-11 15:53:43 +00:00
Joshua Peraza
78bcb55e1c Construct ProcessMemoryLinux using PtraceConnection
Update ProcessMemoryLinux to be constructed from PtraceConnection
instead of being Initialize()d with a pid_t.

This allows consolidating PtraceClient's BrokeredMemory with
ProcessMemoryLinux and providing the PtraceConnection as a alternative
to the memory file (previously only done for brokered connections).

Change-Id: I1363e208030eaf595fb8051e9a2c6b255c1f9886
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3072402
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2021-08-11 15:48:33 +00:00
David Fang
d5d78c1469 [third_party] Make mini_chromium relocatable
This will accommodate moving third_party/mini_chromium around.
The default location is unchanged for now.

There are GN variables that may need to be updated when Fuchsia's source
re-organizes its layout:

* mini_chromium_source_parent : this contains a BUILD.gn with groups and
encloses the mini_chromium_source_root.  This is controlled by the
structure of the project that depends on this project.

* _mini_chromium_source_root : this is what is normally checked out from
git, the upstream source directory

* mini_chromium_import_root : points inside source_root to make GN files
accessible.

This first step breaks out case logic for "if (crashpad_is_in_fuchsia)"
even if the value is unchanged for now.  This will faciliate a smaller
change when Fuchsia re-structures third_party sources.

Change-Id: I09e5362f4be8fdb440e3891422881b1053052341
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3062424
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2021-08-11 15:26:03 +00:00
Peter Kasting
ecefe3cd28 Fix an instance of -Wunreachable-code-aggressive.
Bug: chromium:1066980
Change-Id: I7efc356b5457c159c8775f51e3ab5732f51c3f18
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3085085
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2021-08-10 15:34:50 +00:00
Justin Cohen
7b64a33b24 Roll mini_chromium to 8f7a60f.
8f7a60f: [ios/mac] Use clonefile instead of hardlink to populate bundles

Bug: crashpad: 31
Change-Id: I42cdd892fb5c80a737864e2ce268666ca449eb02
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3081861
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-08-09 14:31:38 +00:00
Tamir Duberstein
79d85979e6 Use generic MOCK_METHOD macros
These macros were introduced in 2018. See
https://github.com/google/googletest/commit/c5f08bf.

Mark mocks "override" where needed and move
"-Wno-inconsistent-missing-override" to gmock_all_test since
googletest/googlemock/test/gmock-function-mocker_test.cc doesn't always
specify "override" on mocks.

Change-Id: Icdc0a0ac986ab8d8d904173d093096c8f666ec04
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3079439
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2021-08-09 14:04:38 +00:00
Nico Weber
058c1c2d9c Fix a few -Wunreachable-code-aggressive warnings
No behavior change.

Bug: chromium:1066980
Change-Id: Ic9485f3244516a4196965d2ebb2bfbc2c62a91d7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3054401
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-07-27 15:00:08 +00:00
Tamir Duberstein
a62b654838 Add fuchsia.net.name.Lookup
This is needed to facilitate transitioning from fuchsia.net.NameLookup.

Bug: 49741
Change-Id: Ife6015bfe58c01aad98d12b13cecd4bb56b34537
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3036084
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-07-16 22:08:48 +00:00
Joshua Peraza
3ae82cd30a Remove gyp
Standalone Crashpad for Android can now be built with gn.

Change-Id: I0ee7f8e1af8c2bc0edb88e93b345abd7d739f33c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3034984
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2021-07-16 17:09:48 +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
Hans Wennborg
e481b16bf4 Add missing <ostream> include
It's currently included by string_piece.h, but that include is going
away.

Bug: crashpad:none
Change-Id: I5214e888f086b12e91121f81ef94c8038fe9558a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3015681
Commit-Queue: Hans Wennborg <hans@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
2021-07-08 17:08:21 +00:00
Peter Kasting
a7177e8bec Fix -Wunreachable-code-aggressive.
Bug: 1066980
Change-Id: Idf51fbf5fc45a33aef4830d76d324011871e2b6a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2997563
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2021-06-30 17:55:56 +00:00
Shai Barack
c4081b8e6d fuchsia: Port syslog includes to use SDK path
Change-Id: Id52dab839af3bd29b425ea6339153e9a55d70430
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2991505
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-06-28 16:26:49 +00:00
Justin Cohen
3b0ebc29cd Cleanup some diffs between Chromium and Crashpad.
Some header changes (page_size), formatting and exception processor
cast changes.

Change-Id: Id1d2dd99ee6d82b5322692894e4e12e96fcac030
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2936663
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-06-28 14:25:39 +00:00
Fabrice de Gans
cdee8004c6 [code-health] Migrate crashpad PRESUBMIT.py to python3
Bug: 1212081
Change-Id: Ibb90b861acb53655b33a67778f28a2d052698e18
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2979473
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
2021-06-23 15:58:24 +00:00
Mark Mentovai
883a64e8ee mac/arm64: recognize “Apple M1” as a valid CPU vendor
The DTK reported “Apple processor” in this spot, but shipping hardware
now seems to use “Apple M1”. The DTK is no longer relevant, but for some
degree of future-proofing, look for “Apple ” as prefix in the test.

Test: snapshot_test SystemSnapshotMacTest.CPUVendor
Bug: chromium:1222625
Change-Id: I6ead87ebe9aa078ef9a95e5bcc6a9e5ca8c3b55a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2976787
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2021-06-22 15:28:16 +00:00
Shai Barack
cbec52f327 fuchsia: rebase include paths to //
See: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=78683

Bug: fuchsia:78683
Change-Id: Ibf6d79d9fdb38122faa3a079f291a9017913f168
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2959009
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-06-15 21:03:28 +00:00
Peter Kasting
8804387c75 Fix -Wc++11-narrowing in crashpad.
timeval's first member's type is __kernel_old_time_t on at least
Windows; this is a 32-bit type as opposed to time_t, which is a 64-bit
type.  As a result, casting directly to time_t results in a truncation,
triggering the warning.

It's not possible to cast directly to __kernel_old_time_t, since that
type is not exposed here.  Instead, cast to the underlying type, long,
which should work correctly on all platforms.

This has Year 2038 problems (which is why time_t is switching to
64-bit), which I suspect would be best fixed by a larger change like
moving away from using timeval anywhere (?).  I'm not really certain
what all would be involved in trying to make this whole pipeline
Y2038-safe, so I haven't attempted to tackle this.

Bug: chromium:1216696
Change-Id: Ia335a488175b1d8e851c94b56705530bb4e421af
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2949650
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-06-09 14:55:50 +00:00
Francois Rousseau
21313fad9a fuchsia: allow FATAL log messages in tests
* Crashpash has a few DEATH tests that will FATAL

Fixed: fuchsia:77967
Change-Id: Ifa4326e265d752efaedd6df91f1b6ee61a1e36c1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2937542
Commit-Queue: Francois Rousseau <frousseau@google.com>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2021-06-03 20:36:02 +00:00
Francois Rousseau
7ad54b8831 fuchsia: allow ERROR log messages in tests
Fixed: fuchsia:77967
Change-Id: Id19a0de3c04630c99c36dea8d52d1ea638214239
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2936513
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-06-03 18:23:56 +00:00
Justin Cohen
1d45a4bafb Pass FilePath by reference in CrashReportDatabase.
Missing &.

Change-Id: I3a5b14cecb6fe6e7c9e44f79b00101b15157a856
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2920553
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-06-03 16:10:26 +00:00
Justin Cohen
ce378c4293 Fix some chromium roll errors and warnings.
Remove unneeded base/strings/stringprintf.h includes.
ARCH_CPU_X86_64 macro is used without including build/build_config.h
Missing base/check.h

Change-Id: Ib7864ab7b30ef8fc37649783f7b90b618d0d6a0b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2920552
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-06-02 22:02:42 +00:00
Francois Rousseau
b7cf20f171 Roll mini_chromium to 2470faf
2470faf fuchsia: implement LOG_TO_SYSTEM_DEBUG_LOG

Bug: fuchsia:76645
Change-Id: Ia03cce001be41859f5e07428a04fae3e968457e5
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2920723
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-05-27 00:39:55 +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
Francois Rousseau
e58fde685b Roll mini_chromium to 47e19cc
47e19cc fuchsia: remove timestamp, pid and tid from log message

Bug: fuchsia:76645
Change-Id: I430db2dbdf2b0ebface13a053d6218e0c11671c7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2919504
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-05-26 19:01:45 +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
161a84977b Check for empty children after dropping overlapping ranges.
Before this changes, the logic checked for empty children before
DropRangesThatOverlapNonOwned in CoalesceOwnedMemory.

This could lead to a NULL added to the children vector, which will
later lead to a crash.  Instead check after drop ranges.

Change-Id: If1321ab618bfabf22dfcaea1c643e88771a52dea
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2906378
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-05-25 14:32:14 +00:00
Justin Cohen
b2b65a91cf ios: Add support for intermediate dump reader and writer.
Due to the limitations of in-process handling, an intermediate dump file
is written during exceptions. The data is streamed to a file using only
in-process safe methods. The file format is similar to binary JSON,
supporting keyed properties, maps and arrays.
 - Property [key:int, length:int, value:intarray]
 - StartMap [key:int], followed by repeating Properties until EndMap
 - StartArray [key:int], followed by repeating Maps until EndArray
 - EndMap, EndArray, EndDocument

Similar to JSON, maps can contain other maps, arrays and properties.

Once loaded, the binary file is read into a set of data structures that
expose the data, maps and arrays.

Bug: crashpad: 31
Change-Id: I43a19204935303afd753c8c7090c54099634ccd6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2870807
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-05-24 16:53:26 +00:00
Justin Cohen
6f8dfc7730 ios: Rename RAW_LOG to CRASHPAD_RAW_LOG.
Deconflict with chromium RAW_LOG.

Change-Id: Iac0110f52259595175aaed983ea3ac6136911407
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2910732
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-05-20 15:03:42 +00:00
Leonard Grey
3a112cfefd Modernize Objective-C
Via tools/mac/rewrite_modern_objc.py in the Chromium repo

Bug: chromium:324079
Change-Id: I3160331899b3ea75e0ebc78abd9a0a84e9339b40
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2904179
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
2021-05-18 19:35:51 +00:00
Ken Rockot
a6494f9df6 Fix ScopedFD usage in unit test
Fixes a minor detail in the CrashReportDatabaseTest.CleanBrokenDatabase
test wherein a ScopedFD is explicitly closed before being released.
Despite being technically safe in this instance, an impending upstream
Chromium change to track and enforce ScopedFD ownership will catch this
as a potential bug and intentionally crash the test.

Change-Id: Ie5c2c84d7501036d16f990bb6093fcd406fa598d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2898048
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
2021-05-14 20:45:17 +00:00
Francois Rousseau
e841b92e18 fuchsia: clarify stack capture in case of stack overflow
Bug: fuchsia:74897
Change-Id: I1a81feaa2e854c51d7dc476d57b5f7d1ffb1d6e7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2895346
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-05-14 00:22:16 +00:00
Scott Graham
0ac2a18ece Roll mini_chromium to c0c965a
c0c965a fuchsia: Re-enable logging

Bug: fuchsia:76641
Change-Id: I43818096344f4e7898acec1cbb9483696e15592f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2894944
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2021-05-13 21:45:16 +00:00
Peter Kasting
d9bc7cf06a Remove runtime conversions of compile-time string constants.
These will become a compile error on the Chromium side soon.

Bug: chromium:1189439
Change-Id: I526fc61c77ed97b4dc5e6a5215f60dfa3580b564
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2876866
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-05-07 20:01:29 +00:00
Justin Cohen
d5b3a1d531 ios: Add support for ScopedVMRead and RAWLOG
Adds wrapper to vm_read and vm_deallocate memory to allow for safe
in-process memory reads during crashes.

Also adds a logging utility safe for in-process exception handling.

Bug: crashpad: 31
Change-Id: I658f3181cbec40a79e304b7306466e10c003564f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2875349
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-05-07 19:00:19 +00:00
Jay Zhuang
0c3d6e5fa1 [roll] mini_chromium
ccb1989 [build] Replace response file with write_file

Change-Id: If03dc6004e61d98d0ddf20fd4d795c831aa2e485
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2877798
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2021-05-06 22:56:28 +00:00