2424 Commits

Author SHA1 Message Date
Peter Kasting
b6d3cdcc4d Roll crashpad/third_party/mini_chromium/mini_chromium/ 42f1fddfe..bc8dca83b (3 commits)
42f1fddfec..bc8dca83bd

$ git log 42f1fddfe..bc8dca83b --date=short --no-merges --format='%ad %ae %s'
2023-10-18 pkasting Add iter_reference_t to template_util.h.
2023-10-18 thestig Remove check_op.h from base/logging.h
2023-10-17 pkasting Add base::StrCat().

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Bug: 1371963
Change-Id: I19a74661930c733814403c9813fe544fe0540b1f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4953853
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2023-10-19 00:33:28 +00:00
Lei Zhang
c63c073d27 Do IWYU for check_op.h
Include check_op.h directly, instead of relying on the transitive
include from logging.h. This transitive include does not exist in
Chromium's //base.

Change-Id: I15962a9cdc26ac206032157b8d2659cf263ad695
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4950200
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2023-10-18 20:01:37 +00:00
Peter Kasting
ce4e3d6ee0 Roll crashpad/third_party/mini_chromium/mini_chromium/ 276f2ac53..42f1fddfe (1 commit)
276f2ac531..42f1fddfec

$ git log 276f2ac53..42f1fddfe --date=short --no-merges --format='%ad %ae %s'
2023-10-16 pkasting Use POSIX format specifiers on Windows.

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Bug: 1371963
Change-Id: I7210b416b5e498b9888d1c942084c07ef177b667
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4944315
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-10-17 01:24:23 +00:00
Peter Kasting
aef75040fd Use format macros for int64_t instead of hardcoding the format.
Bug: 1371963
Change-Id: I7fa4557472684cdd2b8e0cc977230941f26f1eaa
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4943901
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2023-10-16 23:52:56 +00:00
Sylvain Defresne
7c89d500cd [ios] Remove ios_use_shared_bundle_id_for_test_apps gn variable
The variable was to true in https://crrev.com/c/3308823 and is
never overridden. Remove it as it simplify the logic of the
test targets (and remove code duplication).

  This is a followup to https://crrev.com/c/4935576 which make
  the corresponding change in the Chromium repository.

Bug: 1250788
Change-Id: Ide05fa3bf4177b5761ef0ad5c6edf9baf181b28c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4943570
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2023-10-16 16:04:01 +00:00
Leonard Grey
63ec9482cf Windows: don't compile HandleHeapCorruption on ASAN
f145b54e8378c8e2bd1fbb427684ca9b4c54ea9c put the only reference to this
in a non-ASAN block, so we're hitting an unused function warning rolling
into Chromium

Bug: crashpad:464
Change-Id: I225debd48a255aa5214e02a6821dcd72c618f141
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4939552
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
2023-10-16 15:10:06 +00:00
Leonard Grey
2f6cffa676 Mac: don't consider module order in process reader tests
This is a follow-up to 0fc1b6ae780e7ba854652bd5581f936abf824a5e.

The change in macOS 14's dyld to insert new modules in the front of
`dyld_all_image_infos` means that if any images are loaded after the
executable and its direct dependencies, it's no longer possible to
rotate the list to match the order used by the `dyld_get_image...`
APIs.

This forces us to dispense with checking the order at all except to
ensure that the executable is first, and dyld itself is last.

Additionally fixes an unreachable return introduced in
0fc1b6ae780e7ba854652bd5581f936abf824a5e.

Bug: chromium:1452203
Change-Id: If0b09b9110d8f60d29cca79ea6a59050b0293c5e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4935952
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-10-13 17:23:26 +00:00
Rich Mckeever
f145b54e83 Stop registering Windows VEH in ASAN builds.
ASAN injects a bad de-reference in HandleHeapCorruption() that causes it to be recursively invoked.

Bug: crashpad:464
Change-Id: I5e8db5555462166b963e0e43c6eb8ac0b327219e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4935953
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Rich Mckeever <mckeever@google.com>
2023-10-13 14:39:58 +00:00
Leonard Grey
0fc1b6ae78 Mac: update ProcessReaderMac and tests for macOS 14
dyld in macOS 14 has two changes that impact how we read in modules:
- Timestamp is always empty
- The executable appears *last* rather than first in the
dyld_all_image_infos array (see comment for details)

This change:
- Removes all timestamp checks in the tests
- Removes 10.6 era code that worked around a different "executable in
the wrong place" issue. Replaces this with a new branch that checks
if the executable is in the last position, and rotates it to the
front if so. This is necessary instead of just swapping (as in the 10.6
code)  so that it can match the order returned by the `dyld_get_image...` family.

Bug: chromium:1452203
Change-Id: Iac9b29a0d9b9461b0ef386c9541661171ef9fd11
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4917145
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-10-09 15:32:57 +00:00
Thomas Gales
a1b467ab45 Pull latest toolchain
The previous CIPD location was stale and the packages there are no
longer updated. Compiling for Fuchsia using the latest toolchain
revealed that zlib needed to be updated as well to resolve errors
thrown by -Wstrict-prototypes.

Newer versions of zlib fail to compile for Fuchsia without the addition
of -Wno-sign-compare, recommended for this situation by the Fuchsia
toolchain team.

Bug: fuchsia:128938
Bug: fuchsia:128939

Change-Id: Iccf6dcb1aef1e1811f458fd18a2f04e7b044a918
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4893089
Commit-Queue: Thomas Gales <tgales@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-10-06 21:22:25 +00:00
Justin Cohen
b90db3e47f ios: Fix Chromium bundle id for xcuitest.
This is needed in Chromium for enabling iOS PartitionAlloc

Rolls mini_chromium to support overriding the BundleIdentifier.

Bug: 1489308
Change-Id: I314958182f35edba3300e545b2877d288b43ccb9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4911575
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2023-10-04 19:29:39 +00:00
Rupert Ben Wiser
485cfaf26e Update chromium_mini dependency
We had an issue that was causing breackages with Fuchsia builders. We
needed to copy over additional code to mini_chromium. Making sure this
relies on the improved version as well.

Bug: 1484644
Change-Id: I0250a44cb29c758d7865cc6222d32a69048c9157
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4905890
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2023-09-29 20:40:12 +00:00
Rupert Ben Wiser
7f6d9e9c7f Add support for matching with key allowlist
WebView makes use of this allowlist. We are hoping to
include switches and features in our crash keys as users
can enable these with an easily available developer UI.

These crash keys follow a pattern of "switch-<index>" so
it is impractical to indefinitely add a larger list of switch
keys. Adding this matcher lets us rather add "switch-*".

Bug: 1484644
Change-Id: I667cef70cce1efb0710b4a2f009d8d80a1eeae5a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4894239
Commit-Queue: Rupert Wiser <bewise@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-09-29 16:53:15 +00:00
Alex Gough
ac0c27a923 Deregister vectored exception handler on client destruction
Some users of crashpad load and unload the dll that hosts
crashpad code. crashpad registers a vectored exception handler
to help collect heap corruption crashes. If the dll is
unloaded this handler might still be called.

This CL adds a scoped handler for such registrations and
uses it on Windows crashpad client. To allow this to
be stored, RegisterHandler() on the client needs to move
onto the client object from being a helper function.

Bug: crashpad:462
Change-Id: I5d77c056e2a9a61ddcfa9d0186ab4bfd85a19bff
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4898263
Reviewed-by: Ben Hamilton <benhamilton@google.com>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2023-09-28 17:24:39 +00:00
Mark Mentovai
8da335ffad mac: Fix build with deployment target ≥ 11
This fixes the following warning during compilation:

> process_reader_mac_test.cc:670:7: warning: address of function
> '_dyld_shared_cache_contains_path' will always evaluate to 'true'
> [-Wpointer-bool-conversion]

while still retaining compatibility with pre-macOS 11 runtimes when
built with a suitable deployment target.

Bug: 461
Change-Id: I61a360e8e02ceb7209c887819a4916a68384b89d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4873433
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2023-09-19 21:50:26 +00:00
Anne Redulla
d25c332228 [ssci] Added Shipped field to READMEs
This CL adds the Shipped field in READMEs. See the LSC
doc at go/lsc-chrome-metadata.

Bug: b:285450740
Change-Id: I3dcd5e027f06982f4c2dd98136d3a6d7f6228b4e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4666416
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2023-09-12 18:36:50 +00:00
Keishi Hattori
a7cfe95351 Reland "Add SetLastChanceExceptionHandler to implement permissive MTE mode"
This is a reland of commit b1e66e322ddd07f4640ee8bad93397a0511cd313

Original change's description:
> Add SetLastChanceExceptionHandler to implement permissive MTE mode
>
> SetLastChanceExceptionHandler sets a callback to be called after a
> crash has been reported. Returning true from this callback will
> not reraise the signal so the execution can continue. This will be
> used to implement permissive MTE mode, which will continue execution
> after a MTE crash.
>
> Bug: chromium:1467915
> Change-Id: I93a28ceea921fe977805482cf47c07643ca6133c
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4707688
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Commit-Queue: Keishi Hattori <keishi@chromium.org>

Bug: chromium:1467915
Change-Id: Ibdc18084deb08bccf3c74f688b7d48ff24fe81f9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4756235
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Keishi Hattori <keishi@chromium.org>
2023-09-05 12:40:07 +00:00
Thomas Gales
ea0496c82e Roll crashpad/third_party/mini_chromium/mini_chromium/ 0c540fd54..10f39a976 (1 commit)
0c540fd546..10f39a9765

$ git log 0c540fd54..10f39a976 --date=short --no-merges --format='%ad %ae %s'
2023-08-09 tgales [riscv][android] Add Android RISC-V support

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Fixed: fuchsia:128936
Change-Id: Iee194c24b1dd4418e0f882c7e8c96e2c85eaa617
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4824417
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Thomas Gales <tgales@google.com>
2023-08-29 23:34:26 +00:00
Mike Frysinger
52c427a2e4 tests: stop using legacy gtest APIs
These are being removed from gtest, so stop using them.

Bug: chromium:1474588
Change-Id: I0d42da9f14dad5c5dc17d980146cb289d444dbda
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4803329
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2023-08-22 23:14:23 +00:00
Avi Drissman
a736f7d070 Roll mini_chromium putting /base/apple files into base:🍎:
Bug: chromium:1474628
Change-Id: Ief0efef22759b935045bf0216a313c2de8025403
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4799234
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
2023-08-21 20:35:28 +00:00
David 'Digit' Turner
50ce1550a1 [fuchsia] Move //zircon/public/lib/zx to //zircon/system/ulib/zx
Bug: fuchsia:70426
Change-Id: I346b0d4c1bd411ef106fdc36ca4d846d875fceb9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4753382
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-08-21 14:56:26 +00:00
Avi Drissman
13e3accfe8 Roll mini_chromium, adjust to more files in base/apple
This rolls mini_chromium to the version that has more files in
base/apple, and adjusts the code to match.

Bug: chromium:1444927
Change-Id: I9642698c8c16151bd0aaca7b46745a59d6e5e6d3
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4791121
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
2023-08-17 15:25:58 +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
Avi Drissman
43d04a8661 Update comment for new file location
https://crrev.com/c/4781926 moves PA files to new locations. This
updates the filename reference.

Bug: chromium:1444927
Change-Id: I7947711055eb444ab5bc28d4e3c6ca2c39a17e04
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4784548
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-08-16 19:01:57 +00:00
Thomas Gales
3f3b7a856d Roll crashpad/third_party/mini_chromium/mini_chromium/ 2035d204b..a722d31ef (1 commit)
2035d204bd..a722d31ef5

$ git log 2035d204b..a722d31ef --date=short --no-merges --format='%ad %ae %s'
2023-08-07 tgales [fuchsia][mac] Fix build errors

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Fixed: fuchsia:131454
Change-Id: I77d9291cb9cd9cdf967761567e27ae9b0b32b98b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4761366
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Thomas Gales <tgales@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-08-09 16:39:31 +00:00
Mark Mentovai
77c1ad28d4 Add support for linux-arm64
To support linux-arm64 build hosts, use an appropraite build of gn on
those systems.

To support linux-arm64 targets, this also updates mini_chromium to
2035d204bd0f812ac95a1ed72038e6bdbcfce4a2:

2035d204bd0f Add support for linux-arm64

Change-Id: I04139d9136d36fcb0a15aee2ce0694909d44ae95
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4760265
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-08-08 17:02:19 +00:00
Thomas Gales
343aa69084 Revert "[fuchsia][mac] Fix build errors"
This reverts commit ca6d64d0ae4905ad7033adab0a28273a0741ee5c.

Reason for revert: The changes did not actually fix the problem once combined with the latest changes from mini_chromium.

Original change's description:
> [fuchsia][mac] Fix build errors
>
> A recent CL [1] broke Fuchsia's Crashpad roller due to duplicate build
> argument declarations. This CL ensures that sysroot.gni is only imported once.
>
> [1] https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/4651973
>
> Fixed: fuchsia:131454
> Change-Id: Idcf6ac65cdffee2c9a9551559a8aab0063044428
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4743381
> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
> Commit-Queue: Thomas Gales <tgales@google.com>

Change-Id: Id3dc42484fbd87e242756c8d2889d2e404370ac7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4753637
Commit-Queue: Thomas Gales <tgales@google.com>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-08-04 20:26:15 +00:00
Peter Kasting
419f995aab Ban [w]ctype.h: crashpad
Bug: chromium:1361094
Change-Id: Ia5dacb9038cd74b5d490282a8070fb4579ebe3ae
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4750179
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2023-08-04 16:50:05 +00:00
Peter Kasting
8132af7ccb Roll crashpad/third_party/mini_chromium/mini_chromium/ e009af846..d1baeddcb (3 commits)
e009af846e..d1baeddcb8

$ git log e009af846..d1baeddcb --date=short --no-merges --format='%ad %ae %s'
2023-08-03 pkasting Reorder string_util.h platform-specific #includes to match Chromium.
2023-08-04 rahul.yadav Add base/types/cxx23_to_underlying.h to mini_chromium base
2023-08-03 pkasting Add base::IsAscii(Digit,Whitespace) to mini_chromium.

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Change-Id: I93ba6ef4eba235840e18d0981aaaa926da26159a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4750022
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2023-08-04 16:35:22 +00:00
Avi Drissman
617429d358 Remove ARC boilerplate in Crashpad
ARC is now enabled by default, so there’s no need to enforce it
against files being put into non-ARC targets.

Bug: chromium:1468376
Change-Id: I58bbb4d1736293a6e9977954ce932dcfe2bafa54
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4750419
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2023-08-03 20:21:42 +00:00
Keishi Hattori
ce7f0f1de9 Revert "Add SetLastChanceExceptionHandler to implement permissive MTE mode"
This reverts commit b1e66e322ddd07f4640ee8bad93397a0511cd313.

Reason for revert: test was flaky on Android bot

Original change's description:
> Add SetLastChanceExceptionHandler to implement permissive MTE mode
>
> SetLastChanceExceptionHandler sets a callback to be called after a
> crash has been reported. Returning true from this callback will
> not reraise the signal so the execution can continue. This will be
> used to implement permissive MTE mode, which will continue execution
> after a MTE crash.
>
> Bug: chromium:1467915
> Change-Id: I93a28ceea921fe977805482cf47c07643ca6133c
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4707688
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Commit-Queue: Keishi Hattori <keishi@chromium.org>

Bug: chromium:1467915
Change-Id: Id815a780b576088974101117a4587adec64cfe8c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4750459
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-08-03 19:12:36 +00:00
Keishi Hattori
b1e66e322d Add SetLastChanceExceptionHandler to implement permissive MTE mode
SetLastChanceExceptionHandler sets a callback to be called after a
crash has been reported. Returning true from this callback will
not reraise the signal so the execution can continue. This will be
used to implement permissive MTE mode, which will continue execution
after a MTE crash.

Bug: chromium:1467915
Change-Id: I93a28ceea921fe977805482cf47c07643ca6133c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4707688
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Keishi Hattori <keishi@chromium.org>
2023-08-03 16:00:18 +00:00
Thomas Gales
ca6d64d0ae [fuchsia][mac] Fix build errors
A recent CL [1] broke Fuchsia's Crashpad roller due to duplicate build
argument declarations. This CL ensures that sysroot.gni is only imported once.

[1] https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/4651973

Fixed: fuchsia:131454
Change-Id: Idcf6ac65cdffee2c9a9551559a8aab0063044428
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4743381
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Thomas Gales <tgales@google.com>
2023-08-02 23:02:59 +00:00
Thomas Gales
8dcf2b216f [fuchsia] Don't build CaptureContext
CaptureContext isn't actually used on Fuchsia and there is a desire to
remove `ucontext_t` from Fuchsia as it isn't a real concept on Fuchsia
and was only added as a placeholder. Moreover, `ucontext_t` won't ever
be added to Fuchsia for RISC-V.

Bug: fuchsia:123052
Fixed: fuchsia:131112
Fixed: fuchsia:127655
Tested: `fx test crashpad` on core.x64 emulator
Tested: `fx test crashpad` on ARM64 device
Tested: `fx shell crasher` @ 16b19a9891978487 on ARM64 device, ran
through Breakpad stackwalker locally as well
Tested: `fx build crashpad_tests` for minimal.riscv64
Change-Id: I4695054426df78a9deff8c9ea9c478b5bf9701b1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4717085
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Thomas Gales <tgales@google.com>
2023-07-31 20:03:40 +00:00
Avi Drissman
3df478b96d Remove redundant ARC configuration in Crashpad
ARC is now enabled by default in Chromium, so enabling it explicitly
in Crashpad is redundant.

Bug: chromium:733237
Change-Id: I59dd863c0f8e7e16e88b6daccc5f900829c0cec5
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4721646
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
2023-07-26 21:00:50 +00:00
Clayton McCray
dcba40ceea [inspect] Route InspectSink in crashpad
Bug: 93344
Change-Id: Id794e3c79983b4c2352842edfe73a81ad3958b6e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4676565
Commit-Queue: Clayton McCray <claytonmccray@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
Reviewed-by: Francois Rousseau <frousseau@google.com>
2023-07-11 17:00:36 +00:00
Avi Drissman
00ce1f9f8f Disable PtraceBroker.SameBitness
Bug: chromium:1459865
Change-Id: I28d5caa739c5b59f4af1f062616443aa16fadfa1
Fixed: chromium:1459862
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4663174
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2023-07-05 15:47:28 +00:00
Avi Drissman
9e37dc46b6 Convert Crashpad to use ARC
See
https://chromium.googlesource.com/chromium/src/+/main/docs/mac/arc.md
for information about this conversion.

Bug: chromium:1280726
Change-Id: I9ed10e9a255eb6b13035b05bcc587c4b6cb7b78e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4651106
Reviewed-by: Mark Mentovai <mmentovai@google.com>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-06-30 15:55:24 +00:00
Chong Gu
87e1883047 [Fuchsia] Replace checking out gn SDK with core
The gen_build_defs.py file is lightly modified from the original one in
https://source.chromium.org/chromium/chromium/src/+/main:build/fuchsia/gen_build_defs.py to accommodate for the fact that the SDK gets
downloaded into a different folder in crashpad

Bug: chromium:1432399
Change-Id: I2c5a5337220b6aca138ca6eb1c37895ca32e72cd
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4600615
Commit-Queue: Chong Gu <chonggu@google.com>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-06-29 13:53:08 +00:00
Alex Gough
a5e179663a Catch heap corruption failures on Windows
Windows claims that heap corruption crashes are passed
to Windows Error Reporting but they are not, they are
swallowed and the process is simply terminated. WerFault.exe
does not run.

We can however intercept these crashes using a vectored
exception handler which forwards STATUS_HEAP_CORRUPTION
to the normal crash handler.

Adds an end-to-end test.

Bug: 2515
Change-Id: I2e1361dacef6fd03ea0f00327fee0b05a0c4899e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4637533
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-06-23 23:06:52 +00:00
Alex Gough
bc1e904f09 SetErrorMode() in fastfail tests
Some versions of python call SetErrorMode which disables
WerFault handling for the fastfail test programs. We can
set this to a useful value, allowing these tests to run
again locally.

This does not enable the tests on the bots as they continue
to fail.

Bug: crashpad:458
Change-Id: Ibdd2f92ed872bd76490db32dccb2257dd91f8280
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4641231
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2023-06-23 20:49:06 +00:00
Alex Gough
7e5b8ab50b Disable fastfail end_to_end tests on Windows
Something in how python is launching these tests changed and
means that although fastfails in fastfail_test_program launch
WerFault it is not looking for or finding the registered
module, so crashpad_wer.dll isn't being loaded, so no
crashes are there to be analyzed.

Run individually the test programs do produce a crash,
and Chrome continues to catch fast fails.

Bug: crashpad:458
Change-Id: I52a6aa7aefb02d393c93c2c43ec67fc92b2bd0b0
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4637536
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-06-23 17:23:24 +00:00
Thomas Gales
dcdccf56f2 [fuchsia][arm64] Don't query for fp registers
Fuchsia devices are failing to read floating point context for ARM
because floating point registers are in the vector context for ARM.

This CL prevents warning logs from being emitted in this situation.

Fixed: fuchsia:129171

Tested: `fx shell crasher` @ 659207de7293cb30
Change-Id: I1d8d928da122aeb1bc4ac66b789cb638969d0fdf
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4617960
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-06-15 21:20:13 +00:00
Thomas Gales
a540e583ac [fuchsia] Remove/replace outdated bug references
Fuchsia migrated issue tracking to fxbug.dev. It appears that DX-1193
did not get migrated.

Fixed: 121707
Change-Id: I4a7fdf00aed223fedd8b66df87647a29139782a1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4616910
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-06-14 23:13:22 +00:00
Thomas Gales
9464ef52c7 [fuchsia] Don't build crashpad_database_util
Fuchsia does its own storage and upload now, so crashpad_database_util
is no longer relevant to Fuchsia.

Tested: Compiled for and in Fuchsia. Verified crashpad_database_util
artifacts no longer produced.
Change-Id: Ie20bb9b308b77bdd39924f5fe70f182c5c2a0782
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4610969
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-06-13 23:05:51 +00:00
Thomas Gales
2cf938a41d [riscv][fuchsia] Add RISC-V Fuchsia support
Only RV64GC is supported.

RISC-V Fuchsia is not able to serve packages yet so unit testing is not
possible.

Bug: fuchsia:127655

Tested: `crasher` with crashpad added to crashsvc, ran minidump through
Breakpad stackwalker

Change-Id: I1b6d79128759281aee348e333ea15434ab397001
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4602412
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-06-12 21:13:43 +00:00
Thomas Gales
4f5dd67229 [riscv] Add RISC-V Linux support
Only RV64GC is supported.

Bug: fuchsia:127655

Tested: `python build/run_tests.py` on RISC-V emulator
Tested: Created minidump via self-induced crash on RISC-V emulator,
ran through Breakpad stackwalker

Change-Id: I713797cd623b0a758269048e01696cbce502ca6c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4581050
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2023-06-12 21:13:24 +00:00
Leonard Chan
656fc62589 [snapshot] Suppress function type mismatch UB
UBSan is detecting a function type mismatch in this test. This is
because TestModule_GetCrashpadInfo returns a TestCrashpadInfo* but the
function expectes to return a CrashpadInfo*. Structurally, the
TestCrashpadInfo struct is meant to replicate a CrashpadInfo
byte-for-byte, but there's no relationship between the types.

Bug: fxbug.dev/128274
Change-Id: I7b02ca802e55274116d46513b3aa6dc998f6d292
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4599482
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-06-08 21:06:32 +00:00
Thomas Gales
25f724d783 [fuchsia] Add fp registers to x86 context
This lays groundwork for floating point registers to also be included in
RISC-V CPU context.

Bug: fuchsia:5496

Tested: `fx test crashpad`
Change-Id: I6230f146f955ac27f053f670f7f45dfff3560d02
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4594586
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-06-07 15:54:57 +00:00
Eran Rom
788b72f922 Remove Mac OS X Server support
Mac OS X Server has been discontinued as a separate operating system
flavor since 10.6. Current minimal requirements for both Crashpad and
Chromium are above that.

Change-Id: Ia9063be2e55a48e45d9f9974ac2e51bac004f37d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4584570
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-06-02 19:12:29 +00:00