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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- Stop overloading introspect (or implement this in the future)
- Store each overridden allocation zone and correctly direct calls to
the requested zone.
Change-Id: I7294e476bb683149acc61419b095ec0e1098781b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4574037
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Update to a version of mini_chromium that supports RISCV64.
Bug: fuchsia:127655
Tested: `python build/run_tests.py` for Linux target
Change-Id: I872e5e79933eb8f9b9fe7f4ae243ee9bb04c14b0
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4563254
Reviewed-by: Mark Mentovai <mark@chromium.org>
This test only change should improve flake on iOS XCUITests. try_free_default can receive a pointer which doesn't belong to the
allocator and claimed_address may not be implemented in specified zone.
Add fallbacks for both.
This logic is identical to the Chromium equivalent shim in
base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc
Bug:b/270620301
Change-Id: I4a788d4fbc7b324caff18e41618a5f999b4b8d4e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4549684
Reviewed-by: Mark Mentovai <mark@chromium.org>
Fuchsia AddressSanitizer tests were failing because of unaligned memory
access in several unit tests.
Fixed: fuchsia:125877
Change-Id: If577ea9b7be24ef40865a637d8f6b6d94daaeb67
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4510016
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Remove the reference to `base/cxx17_backports.h` from the code.
Bug: chromium:1373621
Change-Id: I84dd5fc1b069b168e4558316344c1f1c5377a68b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4471860
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
In the recent llvm upstream change, https://reviews.llvm.org/D148269,
clang becomes smarter and will remove the infinite recursion function.
Use the clang attribute __attribute__((optnone)) to disable optimization
for it.
Bug: chromium:1435016
Change-Id: I74e823bf64d0b03d81c0bda7a8338e2fa67033aa
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4456156
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Zequan Wu <zequanwu@google.com>
__has_feature is a clang extension. GCC errors out on the test.
Define a helper macro to make the code working with other compilers.
Bug: chromium:819294
Change-Id: I359150acd4700e65b4faf5f297b29664c18000d3
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4418706
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Ben Hamilton <benhamilton@google.com>
Always reset the file descriptor to -1, even if FlushWriteBuffer or
RawLoggingCloseFile fails.
Bug: 1431760
Change-Id: I193f526d65f477bba002dd9faf68996020e48a3b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4406657
Reviewed-by: Ben Hamilton <benhamilton@google.com>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Pointer Authentication works by adding a signature to the top bits of
an instruction or data pointer (only instruction pointers on the stack
are currently signed in Chromium). This can confuse range checks,
because they need to strip the top bits. Masking these bits during sanitization range checks prevents confusion.
Test: Testing was done manually on a device with pointer authentication enabled.
Bug: crashpad:364
Bug: 919548
Change-Id: I2e739cadb2844cfaf73a75596d664135aeb5faac
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4387271
Commit-Queue: Adam Walls <avvall@google.com>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Ben Hamilton <benhamilton@google.com>