2309 Commits

Author SHA1 Message Date
Bruce Dawson
0830895880 ios: Remove unused vector include
When updating Chromium's copy of crashpad I received this very
reasonable warning:

    client\ios_handler\exception_processor.h: Includes STL header(s) but does not reference std::

So, this change removes the #include of vector.

Change-Id: I22f05b542fd4e0b582351072a3e3bb4af402b836
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3459402
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
2022-02-13 04:30:21 +00:00
Bruce Dawson
be4fb6a412 win: Get correct version info from registry
kernel32.dll no longer works as a source of truth for Windows versions
because it is not updated with every Windows update. This change grabs
the last two version numbers from the registry, if possible.

This also copies some code cleanup from Chromium (crrev.com/c/3205913).

Bug: chromium:1248324
Change-Id: I9d6745084060f033cd54c56f832aed4ac163e6be
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3434090
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
2022-02-10 18:00:58 +00:00
Vadim Shtayura
d78c03600c Switch to shorter bucket names in luci-scheduler.cfg.
This is an ongoing LUCI config migration.

R=jperaza@chromium.org

Change-Id: If4a85cf8c9156cacee0305566a345ac1de498d93
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3449163
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2022-02-09 20:57:20 +00:00
André Kempe
45cc0da93a arm64: Add Armv8.3-A PAC support to assembly files
This patch adds optional support for Arm Pointer Authentication Codes.

X30/LR is not stored to stack at any place and restored for usage.
Therefore only adding PAC flag to .note.gnu.property section.

Change-Id: I9581059dfa1eed88af5a73df15b6a0d299caea13
Bug: crashpad: 1145581
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3440070
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
2022-02-08 08:42:05 +00:00
Joshua Peraza
d464981876 Use atomics in metrics recording terminate handler
Accessing static data which requires dynamic initialization produces
undefined behavior in signal handlers.

Bug: crashpad:384
Change-Id: Ic100c8b34cb61a8ed76bd09e5a1178086d31fd68
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3433270
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2022-02-02 22:26:21 +00:00
Joshua Peraza
f96b86e360 Upgrade builders to Ubuntu-18.04
Change-Id: I5f918b37b8eef1ef23930f0570df5baea7f52fad
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3433272
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2022-02-02 22:08:45 +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
36ad571862 ios: Add MemorySnapshotIOSIntermediateDumpTest.
Change-Id: Ib8b962c631d6ae90fb1805dff5e28ab078940328
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3401570
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-01-26 21:58:40 +00:00
Justin Cohen
30d302a8ca ios: Speed up XCUITests by swizzling away Xcode crash check.
Change-Id: Iadda950544448d771960d35fd064f5287bce0484
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3410579
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-01-26 20:12:31 +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
Justin Cohen
b25b523d30 ios: Simplify testBadAccess by removing optimizations.
The badAccess test may return different mach exception codes depending
on optimization levels. Simplify by this by turning off optimization
for this particular test.

Also removes testSegv, which was duplicative and not really testing
SIGSEGV.

Change-Id: Idb92731da6a86545ed83c2bbdd200a0b792c579f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3403040
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-01-21 04:14:57 +00:00
Joshua Peraza
50531fc68f linux: fix missing includes and warnings
Change-Id: If83d74d86f4792ad8f8c4c62116457d1126ae9e9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3404959
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2022-01-20 19:56:16 +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
Joshua Peraza
fd732953ce linux: handle multi-threaded crashes
Handle multiple simultaneous crashes among threads by having
the first crashing thread set an atomic flag and subsequently crashing
threads check the flag before requesting a dump. If a dump has already
been requested, the threads pause on a futex with a timeout in case the
crashing thread crashes again or otherwise fails to WakeThreads().

The thread_local disabled_for_thread_ is removed and combined with this
flag because accessing thread_locals produces undefined behavior in
signal handlers.

Bug:crashpad:384, chromium:861730
Change-Id: I83bce36e1010d0635ba8aeac937e150c43a4166f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3403017
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2022-01-20 18:38:56 +00:00
Joshua Peraza
667424894f linux: re-order first-chance-handlers, and disabled signal handlers
Both running first chance handlers and checking for disabled signal
handlers should no longer interact with DumpWithoutCrashing().

First-chance-handlers should also run even with disabled crashpad
signal handlers or else those signals would be reported by the next
chained signal handlers as crashes.

Change-Id: I64b3da42c400a1c431c6228d4da181ed56bfda89
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3403413
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2022-01-20 17:23:26 +00:00
Mark Mentovai
1721bb991c Remove unused header <string> from client/settings.h
Change-Id: I04d065f8f77797e6a301dffde30dcfe376e9a48d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3402639
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2022-01-19 20:57:45 +00:00
Mark Mentovai
50ed179e9a Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_*) instead of defined(OS_*).

This was generated mostly mechnically by performing the following steps:
 - sed -i '' -E -e 's/defined\(OS_/BUILDFLAG(IS_/g' \
                -e 's%([ !])OS_([A-Z]+)%\1BUILDFLAG(IS_\2)%g' \
       $(git grep -l 'OS_'
         '**/*.c' '**/*.cc' '**/*.h' '**/*.m' '**/*.mm')
 - sed -i '' -e 's/#ifdef BUILDFLAG(/#if BUILDFLAG(/' \
       $(git grep -l '#ifdef BUILDFLAG('
         '**/*.c' '**/*.cc' '**/*.h' '**/*.m' '**/*.mm')
 - gsed -i -z -E -e \
       's%(.*)#include "%\1#include "build/buildflag.h"\n#include "%' \
       $(git grep -l 'BUILDFLAG(IS_'
         '**/*.c' '**/*.cc' '**/*.h' '**/*.m' '**/*.mm')
 - Spot checks to move #include "build/buildflag.h" to the correct parts
   of files.
 - sed -i '' -E -e \
       's%^(#include "build/buildflag.h")$%#include "build/build_config.h"\n\1%' \
       $(grep -L '^#include "build/build_config.h"$'
         $(git grep -l 'BUILDFLAG(IS_'
           '**/*.c' '**/*.cc' '**/*.h' '**/*.m' '**/*.mm'))
 - Add “clang-format off” around tool usage messages.
 - git cl format
 - Update mini_chromium to 85ba51f98278 (intermediate step).
   TESTING ONLY).
 - for f in $(git grep -l '^#include "build/buildflag.h"$'
              '**/*.c' '**/*.cc' '**/*.h' '**/*.m' '**/*.mm'); do \
       grep -v '^#include "build/buildflag.h"$' "${f}" > /tmp/z; \
       cp /tmp/z "${f}"; done
 - git cl format
 - Update mini_chromium to 735143774c5f (intermediate step).
 - Update mini_chromium to f41420eb45fa (as checked in).
 - Update mini_chromium to 6e2f204b4ae1 (as checked in).

For ease of review and inspection, each of these steps is uploaded as a
new patch set in a review series.

This includes an update of mini_chromium to 6e2f204b4ae1:

f41420eb45fa Use BUILDFLAG for OS checking
6e2f204b4ae1 Include what you use: string_util.h uses build_config.h

Bug: chromium:1234043
Change-Id: Ieef86186f094c64e59b853729737e36982f8cf69
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3400258
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2022-01-19 20:21:19 +00:00
Justin Cohen
b714b223ad ios: Actually merge memory snapshot data.
To avoid unnecessary duplication of potentially large memory regions,
the iOS MemorySnapshot data is owned by the intermediate dump. When
merging two iOS memory snapshots, it's necessary to copy the merged
data into a vector owned by the memory snapshot itself.

Previously the merged snapshot just contained the original data, which
leads to a heap overrun.

Bug: 1288544
Change-Id: I4eb392800141451db188d17c7b9f9ca9bd3bb603
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3399252
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-01-19 00:00:04 +00:00
Aleksey Khoroshilov
9ed7e84644 MacOS, iOS: Replace dynamic comments in mig-generated files with stable ones.
Mig-generated files contain mig identifiers, which include timestamp and mig build info.
To improve build determinism and goma cachehits we can replace these lines with something stable.

Bug: crashpad:390
Change-Id: Iedb2f6e64428612899587c2ac4d488baf439961f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3394052
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2022-01-18 17:20:04 +00:00
Justin Cohen
243e1fd8e2 ios: Set EXC_SOFT_SIGNAL for signal exceptions.
Right now there's no clear way to differentiate between Signal and Mach
exceptions. Instead, set EXC_SOFT_SIGNAL as the top level exception for
signal exceptions, moving the signal number to ExceptionInfo() and
and the signal code plus the two previous values into Codes().

Fixed:crashpad:389
Change-Id: Ia57f402b98be2a648febb58b9dee0cb80d9e5954
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3388874
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-01-15 03:49:11 +00:00
Avi Drissman
824ddb2de1 Fix presubmit issues
- Formatted util/misc/initialization_state_dcheck.h
- Included build/build_config.h file in
  util/stdlib/aligned_allocator_test.cc as it uses an
  OS_* macro.

Change-Id: I8fb67f1ae440834d1b60f390658513a341789428
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3390648
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
2022-01-15 00:09:21 +00:00
Avi Drissman
b560edd484 Remove ALLOW_UNUSED_LOCAL from Crashpad
Bug: 1286390
Change-Id: I9755258960c55bef84e01812a14067ffaf89d2b1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3388879
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2022-01-14 23:11:32 +00:00
Avi Drissman
23375ab37c Use std::ignore rather than ignore_result in Crashpad
Bug: 1285085
Change-Id: I02f1eb608a704fe58b72c094b96af6c7577be4bf
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3373171
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
2022-01-07 22:38:52 +00:00
Roland Bock
ee230eef02 Replace FALLTHROUGH macro with C++17 [[fallthrough]] attribute
See go/chromium-lsc-fallthrough

Bug:1283907
Change-Id: I786f3e7141ad47913043136d0173e3b82b223a87
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3370128
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2022-01-07 19:26:52 +00:00
Mark Mentovai
7aec285110 Update mini_chromium to 0243b40af70e34c81fc8a30d9b15cd276b2d49ba
0243b40af70e win: Actually compile C++ as C++17, and fix __cplusplus
             macro

Change-Id: If430b97d1cf846746a5226638e04b3a2cdb5efce
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3372325
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2022-01-07 19:04:12 +00:00
Mark Mentovai
4a539c714d Update mini_chromium to 6562d2d0b2a86026a0c8bfc89d95c0a547ed9e5e
6562d2d0b2a8 Compile as C++17 by using -std=c++17 (and /std:c++17 on
             Windows)

Change-Id: I10c209e8147425af77392e7649210ab68a5d27a7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3371781
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2022-01-07 01:36:02 +00:00
Nathan Mulcahey
ae39cec086 [util/net] Fix append to undefined defines
From the Fuchsia build:
```
 ERROR at //third_party/crashpad/util/BUILD.gn:658:7: Undefined identifier.
       defines += [ "CRASHPAD_USE_BORINGSSL" ]
       ^------
 See //src/developer/forensics/crash_reports/BUILD.gn:127:5: which caused the file to be included.
     "//third_party/crashpad/util",
     ^----------------------------
```

Change-Id: I1f563e5bb599b3a7a83ee8211037ee1d7464bd62
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3370891
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2022-01-06 20:04:42 +00:00
Nathan Mulcahey
821d265ea9 [lss] Roll lss and update Fuchsia location
Fuchsia is currently pulling in lss twice, this rolls crashpad up to
HEAD and redirects the Fuchsia build to use the existing copy in our
dependencies.

Change-Id: Ib698ee72d3d1881d22128bc94a1f6f17185a0755
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3364805
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2022-01-06 17:01:52 +00:00
Joshua Peraza
0ea32e0c7b linux: initialize padding bytes in tests for msan
Bug: chromium:1281317
Change-Id: I83a50b851e9648e5270793c9149206103ac40ed1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3350751
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2021-12-20 21:17:35 +00:00
Joshua Peraza
5cc0d543d0 Remove obsolete LUCI experiment
Change-Id: I755d8d6b9490c82ca3044118501add36a532053d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3336402
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2021-12-15 19:36:00 +00:00
Joshua Peraza
b03c11533c Remove unnecessary lines in CaptureMemoryDelegate
Change-Id: I172c5bf9f399791a9bfecd26553450a2ed30315b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3342502
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2021-12-15 19:29:00 +00:00
Alex Gough
ff50a9e8c4 Reland x7 "Bump Windows SDK to 10.0.19041.0"
This is a reland of a8683138db568ad89052587d081d280682439bc4

x86 env var VSINSTALLDIR=path\.\ was interpolated into a gn
vars file with a trailing slash. mini_chromium has been updated
to account for this[0].

[0] https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/3338622

Original change's description:
> Reland x6 "Bump Windows SDK to 10.0.19041.0"
>
> Reland of cfb5c846745a3f3f28c63a1d74345fc965d2bac9.
>
> CL configures crashpad builders to use cipd packaged Windows SDK
> version 10.0.19041 and updates mini_chromium to account for new
> SDK layout[0].
>
> [0] https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/3328284
>
> Bug: 1250098
> Change-Id: Ie8ea11497e31d51478041829c872b47f5c982ab8
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3334271
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Alex Gough <ajgo@chromium.org>

Bug: 1250098
Change-Id: Ie8145d498f4f3f10fd6195d8e0ad5a82bf25933b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3339382
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-12-14 17:44:28 +00:00
Alex Gough
3e234dfe96 Revert "Reland x6 "Bump Windows SDK to 10.0.19041.0""
This reverts commit a8683138db568ad89052587d081d280682439bc4.

Reason for revert: https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8827866127654006481/+/u/generate_build_files_x86/stdout?format=raw

Original change's description:
> Reland x6 "Bump Windows SDK to 10.0.19041.0"
>
> Reland of cfb5c846745a3f3f28c63a1d74345fc965d2bac9.
>
> CL configures crashpad builders to use cipd packaged Windows SDK
> version 10.0.19041 and updates mini_chromium to account for new
> SDK layout[0].
>
> [0] https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/3328284
>
> Bug: 1250098
> Change-Id: Ie8ea11497e31d51478041829c872b47f5c982ab8
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3334271
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Alex Gough <ajgo@chromium.org>

Bug: 1250098
Change-Id: Icef5e7a8c475c06274c935481df22fae1c6cdc3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3338854
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-12-14 13:25:58 +00:00
Alex Gough
a8683138db Reland x6 "Bump Windows SDK to 10.0.19041.0"
Reland of cfb5c846745a3f3f28c63a1d74345fc965d2bac9.

CL configures crashpad builders to use cipd packaged Windows SDK
version 10.0.19041 and updates mini_chromium to account for new
SDK layout[0].

[0] https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/3328284

Bug: 1250098
Change-Id: Ie8ea11497e31d51478041829c872b47f5c982ab8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3334271
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-12-14 12:24:10 +00:00
Adrian Danis
398908903e Fuchsia: Migrate to zx_system_get_page_size
Bug: fuchsia:67899
Change-Id: Id6fb9f67316dd60c939d9b8b6c6d9330831a04a2
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3331859
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-12-14 03:18:50 +00:00
Joshua Seaton
05e4aedfb3 [googletest] Roll pin
googletest is rolled to 5bcd8e3bb929714e031a542d303f818e5a5af45d to pick
up changes that affect how process information is read on fuchsia. The
existing pin is from April 26 2021 and the new one is from June 8: this
is a conservative roll - and the new pin matches that of other fuchsia
SDK partners.

Bug: fuchsia:30751
Change-Id: Ie1c4d075cfc2968c0984671c3afd0bc50fe00d3f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3335589
Reviewed-by: Francois Rousseau <frousseau@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2021-12-13 23:35:19 +00:00
Joshua Peraza
a253f320d5 linux, win: allow disabling extra memory collection
Change-Id: If95c89d554c061522627681af78c8c0d1725df2c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3335359
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-12-13 22:25:03 +00:00
Alex Gough
c1a7d9baea Revert "Reland "Reland "Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0""""""
This reverts commit cfb5c846745a3f3f28c63a1d74345fc965d2bac9.

Reason for revert: https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8828456030785338865/+/u/generate_build_files_x86/stdout?format=raw

Original change's description:
> Reland "Reland "Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0"""""
>
> This is a reland of e5e47bc277532ae109a444cbb3646977c93fc077
>
> Previous attempt failed as depot_tools win_sdk helper did not allow
> the updated path selection for Windows SDKs. This should be fixed by:
> https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3296663
> "[windows_sdk] allow env json to not be relative"
>
> > > > > Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> > > > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> > > > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > > > > Commit-Queue: Mark Mentovai <mark@chromium.org>
> > > >
> > > > Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
> > > > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > >
> > > Change-Id: Iafb40bd8799dbfea9308f19e3c6e7568bcba82df
> > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260757
> > > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > > Bug: crashpad:
> >
> > Change-Id:
> > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3286783
>
> Change-Id: Idadfe861b64e6c3361e98ca690230f30d113cdab
> Bug: 1250098
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3321428
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Alex Gough <ajgo@chromium.org>

Bug: 1250098
Change-Id: I346ee73d690f3102b28df10d4cd2a9a7273608fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3321436
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-12-08 01:06:33 +00:00
Alex Gough
cfb5c84674 Reland "Reland "Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0"""""
This is a reland of e5e47bc277532ae109a444cbb3646977c93fc077

Previous attempt failed as depot_tools win_sdk helper did not allow
the updated path selection for Windows SDKs. This should be fixed by:
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3296663
"[windows_sdk] allow env json to not be relative"

> > > > Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> > > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > > > Commit-Queue: Mark Mentovai <mark@chromium.org>
> > >
> > > Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
> > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
> > > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> >
> > Change-Id: Iafb40bd8799dbfea9308f19e3c6e7568bcba82df
> > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260757
> > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > Bug: crashpad:
>
> Change-Id:
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3286783

Change-Id: Idadfe861b64e6c3361e98ca690230f30d113cdab
Bug: 1250098
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3321428
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-12-08 00:08:38 +00:00
Joshua Peraza
2592a777cb Upgrade LUCI configs to use Mac-11
Bug: chromium:1269911
Change-Id: I6382e6efe3a378916427b824fcfade9c3a72394a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3315414
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2021-12-03 23:44:56 +00:00
Salome Thirot
fe19de6e1d arm64: Add Armv8.5-A BTI support to assembly files.
Change-Id: Ic9c2d252829a39b0331e436df16effe7d0607996
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3241142
Commit-Queue: Jonathan Wright <jonathan.wright@arm.com>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-12-01 10:47:56 +00:00
Justin Cohen
3b8a7cf594 ios: Use _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS for backwards compatibility.
_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS is needed to bring
back std::unexpected, which is removed in C++17, but still needed
for libc++abi for backward compatibility.

Bug: 1274565
Change-Id: I5b5687ef7a49e90bf6937ade8b02ff4484690e09
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3307905
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-12-01 02:24:06 +00:00
Justin Cohen
0453ea1686 ios: Handle empty stack in GenerateStackMemoryFromFrames.
This fixes a _LIBCPP_ASSERT vector[] index out of bounds error, caught
by fuzzer.

Bug: 1274178
Change-Id: I95f3fbe450209a24ccc0229741ea752990e18ed6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3307697
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-29 21:36:05 +00:00
Nico Weber
281ba70a13 Fix build with /std:c++17 on 32-bit Windows
Bug: chromium:1274168
Change-Id: I31c300f5cb078e90f25c5752c821f756dedd8591
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3304552
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2021-11-27 01:26:14 +00:00
Peter Collingbourne
0d26b02c37 Reraise signals via rt_tgsigqueueinfo(2) on Linux (try 2).
Previously we would rely on implicit re-raising to deliver signals to
the underlying handler on POSIX systems if the signal is detected as
being re-raisable via WillSignalReraiseAutonomously(). This detection
mechanism is imperfect, as it will misclassify signals delivered as
a result of kill(2) when passing a signal number usually used for
synchronous signals, but now also asynchronous MTE tag check faults,
which are delivered as SIGSEGV signals on Linux. As a result, these
signals would not be re-raised and therefore would be discarded.

Although we could, for example, teach WillSignalReraiseAutonomously()
about MTE faults, the signal would still be re-raised via raise(3)
and therefore we would lose the information in siginfo.

We can avoid discarding these signals on Linux while at the
same time preserving the siginfo by making use of the syscall
rt_tgsigqueueinfo(2) which delivers a signal together with a
user-provided siginfo. The problem still exists on non-Linux POSIX
systems because this syscall is Linux-specific.

With kernel versions prior to 3.9, the kernel will reject the
rt_tgsigqueueinfo() syscall with EPERM. If that happens, follow
the non-Linux code path.

Change-Id: Ia410fbd651a756945c9402e361edfd5c520453d6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3300991
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
2021-11-25 00:33:31 +00:00
Richard Townsend
0fdeeecba6 fix: link Chromium's libunwind when using sanitizers
Following https://crev.com/d3d85ce0b330b11f73f0495b7b99cea0d04d8c63,
the compiler now does not build an unwind library into the ASAN
runtime, nor is one available from the NDK in r23. Restoring Chrome's
standard dependencies (libcxx, libunwind) prevents a link error.

Bug: 1271628
Change-Id: I62d1c066bd7037276d78e2533dd5e4c3cf14f8c7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3298826
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
2021-11-24 23:53:21 +00:00
Peter Collingbourne
c537245de8 Revert "Reraise signals via rt_tgsigqueueinfo(2) on Linux."
Causes test failures on older versions of Android (e.g. Marshmallow).

Also reverts follow-up CL "Fix dead-code warning in util/posix/signals.cc".

This reverts commits ab9a87fb5463e5d1579e16bacb1f79d0dd71119b and
04431eccfe878570b1c74a5b376d96b4c9c7e0e8.

Bug: 1272877
Change-Id: Id9ef420516c932147b6c8b67d9f4daf9d31d9b03
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3300986
Reviewed-by: Peter Boström <pbos@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
2021-11-24 22:09:30 +00:00
Justin Cohen
bc138fc01c Initialize process snapshot client ids to zero.
Change-Id: If6e1902d62e6364114a75d8ebc4d260e4239d58b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3296266
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-23 20:59:19 +00:00
Justin Cohen
c7ce2e3ec1 ios: Tighten up UIGestureEnvironment exception detection.
iOS 15.1 reordered private APIs before public APIs when looking at the
unw_get_proc_info() frame_info.start_ip, so doing a min/max within
UIGestureEnvironment would fail on devices. However, this API is always
called by UIWindow sendEvent, which is not a private API. Do the same
check, but instead look back 2 frames, and check to see if we are
within UIWindow.

Both APIs are still marked <redacted>, but the detection should still
work.

Also cleans up some tests fixtures when running in release.

Change-Id: I762615e9cb44389800cf3291af52a7568c3825d5
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3299008
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-11-23 20:57:00 +00:00
Justin Cohen
54f2581bf1 ios: Set client id in minidump.
Change-Id: Ie19e0388cf388533b82625a27f7a7a1c2abdaecb
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3294662
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-22 21:28:28 +00:00