Much of crashpad's unittests propagate tagged pointers to fuchsia
syscalls which do not accept tagged values. Rather than fixing them all
right now, just ensure that the tests do not build with the hwasan
variant if enabled.
Bug: fxbug.dev/108368
Change-Id: Ib32eb95ba671a6b55694075b68c7fbbb733cf501
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4175438
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
sed -i '' -E -e 's/Copyright (.+) The Crashpad Authors\. All rights reserved\.$/Copyright \1 The Crashpad Authors/' $(git grep -El 'Copyright (.+) The Crashpad Authors\. All rights reserved\.$')
Bug: chromium:1098010
Change-Id: I8d6138469ddbe3d281a5d83f64cf918ec2491611
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3878262
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Crashpad currently has a circular dependency: client->snapshot->client.
The dependency from snapshot -> client only exists to pull in a single
constant for Windows (CrashpadClient::kTriggeredExceptionCode), so this
change breaks the dependency by splitting the constant out into a new
file util/win/exception_codes.h.
Change-Id: I6b74b367df716e097758e63a44c53cb92ea5e04d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3450763
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
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>
This adds support for capturing memory snippets for addresses
currently stored in registers to Linux/Android/CrOS.
Modeled after the existing support on Windows.
Bug: crashpad:30
Change-Id: Ib7cb523555a6e8e4d70145c205d67dcfbc9c7fcc
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3273712
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
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>
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>
Move some common files out of client and handler for iOS usage.
Bug: crashpad: 31
Change-Id: I1933eaaa7580a81017c52b77dfb636a8fa31ee78
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2851059
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
This makes it possible to run gn check --deps for crashpad/snapshot in
chromium.
ERROR at //third_party/crashpad/crashpad/snapshot/elf/elf_image_reader_fuzzer.cc:19:11: Can't include this header from here.
#include "util/process/process_memory.h"
^----------------------------
Bug: chromium:1159035
Change-Id: Idddcf95da2a349842fa86a8d595216fbca3b8822
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2676581
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This change removes several unaligned accesses, as well a null pointer
offset and an out of bounds array access.
Bug: fuchsia:46805
Change-Id: I0110d0b7faf672655d978894b868760eee7b2988
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2583025
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
This patch moves LoadModule() to it's own file from
process_reader_linux_test.cc so that it may be used in
other tests that interact with loaded modules.
Change-Id: Ie4f7932d65710fc3e20b6e2488e497c5aab27cdd
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2569882
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Because of the multiple-worlds building of the Crashpad code in the
Fuchsia tree (with the Fuchsia BUILDCONFIG.gn in particular) there's no
good location to globally disable Wconversion for all of crashpad.
This can be somewhat-improved by using a GN template
crashpad_static_library() similar to the existing crashpad_executable()
template.
Includes mini_chromium DEPS roll:
68da43e Fix a couple trucation warnings
88ce866 build: set include dirs
Bug: fuchsia:58162
Change-Id: I638fcf858c35b9a858ca2c410636f8c99603aed2
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2411131
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
When building for macOS and configured with target_cpu =
"mac_universal", bi-architecture x86_64/arm64 output will be produced.
mac_universal is, so far, a “Crashpad special” that will only work with
mini_chromium and the standalone Crashpad build, and not the in-Chromium
build. It exists to support Keystone, which intends to ship as
x86_64/arm64 universal.
Includes:
Update mini_chromium to e0008f2714a76c7f2a3854fa75774427a886d6b9
e0008f2714a7 mac-arm64: Allow target_cpu = "mac_universal" to create
universal builds
Bug: crashpad:345
Change-Id: I5ff2dce5ffae58186e33757aa94587f8eca20b99
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2387410
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
GN recently added support for Apple frameworks to link, rather than
overloading the libs lists. This pulls .frameworks out of the libs
lists, so that GN can stop supporting .frameworks in libs in the
future.
Roll mini_chromium ae14a14ab..cd26c5101
$ git log ae14a14ab..cd26c5101 --date=short --no-merges --format='%ad %ae %s'
2020-07-01 rsesek@chromium.org apple: Expand {{framework_dirs}} and {{frameworks}} in the toolchain.
Bug: chromium:1052560
Change-Id: Id70bceb57174a52c6f4a7f72378a3ee0ae89f64d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2278022
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
I’m most interested in picking up 1b3eb6ef3462, “Explicitly define copy
constructors used in googletest tests.”
This also reorganizes files and rewrites text to refer to this project
as Google Test and googletest (and Google Mock and googlemock), as it
prefers to be known. Some filenames are left at gtest_* following the
precedent set by gtest itself. For example, #include "gtest/gtest.h" is
still used, so #include "test/gtest_death.h" is retained too.
gtest_all_test OutputFileHelpersTest.GetCurrentExecutableName hard-codes
the expected executable name as gtest_all_test among other options that
do not include googletest_all_test, so test executables retain their
names as well.
fb19f57880f6 Add GTEST_BRIEF option
3549237957a1 Ensure that gtest/gmock pkgconfig requirements specify
version
189299e957bb Merge branch 'master' into quiet-flag
5504ded3ab5c Fix a typo in .travis.yml
6ed4e7168f54 Replace the last instance of `throw()` with `noexcept`. NFC
879fd9b45299 Remove duplicate codes existed in get-nprocessors.sh
644f3a992c28 gtest-unittest-api_test - fix warning in clang build
0b6d567619fe Remove redundant .c_str()
be3ac45cf673 fix signed/unsigned comparison issue (on OpenBSD)
b51a49e0cb82 Merge pull request #2773 from Quuxplusone:replace-noexcept
c2032090f373 Merge pull request #2772 from Quuxplusone:travis
4fe5ac53337e Merge pull request #2756 from Conan-Kudo:fix-pkgconfig-reqs
373d72b6986f Googletest export
4c8e6a9fe1c8 Merge pull request #2810 from ptahmose:master
71d5df6c6b67 Merge pull request #2802 from e-i-n-s:fix_clang_warning
dcc92d0ab6c4 Merge pull request #2805 from pepsiman:patch-1
4f002f1e236c VariadicMatcher needs a non-defaulted move constructor for
compile-time performance
9d580ea80592 Enable protobuf printing for open-source proto messages
766ac2e1a413 Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_
11b3cec177b1 Fix a -Wdeprecated warning
01c0ff5e2373 Fix a -Wdeprecated warning
c7d8ec72cc4b Fix a -Wdeprecated warning
1b066f4edfd5 Add -Wdeprecated to the build configuration
4bab55dc54b4 Removed a typo in README.md
a67701056425 Googletest export
fb5d9b66c5b0 Googletest export
1b3eb6ef3462 Googletest export
b0e53e2d64db Merge pull request #2797 from Jyun-Neng:master
d7ca9af0049e Googletest export
955552518b4e Googletest export
ef25d27d4604 Merge pull request #2815 from Quuxplusone:simple
129329787429 Googletest export
b99b421d8d68 Merge pull request #2818 from inazarenko:master
472cd8fd8b1c Merge pull request #2818 from inazarenko:master
3cfb4117f7e5 Googletest export
0eea2e9fc634 Googletest export
a9f6c1ed1401 Googletest export
1a9c3e441407 Merge pull request #2830 from keshavgbpecdelhi:patch-1
e589a3371705 Merge pull request #2751 from calumr:quiet-flag
Change-Id: Id788a27aa884ef68a21bae6c178cd456f5f6f2b0
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2186009
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Fixes build error where fuchsia_arm64 builds were failing because they
picked up linux x86 code.
Bug: None
Change-Id: I48a7bc92490604fd2a59cb4d36421cb76f579224
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2172636
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
Gather most of the necessary information for the exceptions snapshot.
Note that:
- The 'capture' portion of this CL will be moved out of the snapshot
interface and into a separate in-process dump to disk location.
- All of the pointer dereferences need to be wrapped in vm_read.
- The read-fast-and-dump logic in thread_snapshot may end up in a
different file completely, but until we pick a
serialization/deserialization method, keep it as-is.
Bug: crashpad:31
Change-Id: Iae4af436cddabd2302689b76c8a4574eb8e48c0e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2098744
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Gather most of the necessary information for the system snapshot.
Note that:
- The 'capture' portion of this CL will be moved out of the snapshot
interface and into a separate in-process dump to disk location.
- All of the pointer dereferences need to be wrapped in vm_read.
- The read-fast-and-dump logic in thread_snapshot may end up in a
different file completely, but until we pick a
serialization/deserialization method, keep it as-is.
Bug: crashpad:31
Change-Id: Iac82491fdb4a823163f02149f52a1e18e26fa9de
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2090173
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Gather most of the necessary information for the thread snapshot.
Note that:
- The 'capture' portion of this CL will be moved out of the snapshot
interface and into a separate in-process dump to disk location.
- All of the pointer dereferences need to be wrapped in vm_read.
- The read-fast-and-dump logic in thread_snapshot may end up in a
different file completely, but until we pick a
serialization/deserialization method, keep it as-is.
Change-Id: I80ba323cb6a59ac0dd1bba9150d047ba83cc4dad
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2085572
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Gather most of the necessary information for the module snapshot.
Note that:
- The 'capture' portion of this CL will be moved out of the snapshot
interface and into a separate in-process dump to disk location.
- All of the pointer dereferences need to be wrapped in vm_read.
- The read-fast-and-dump logic in module_snapshot may end up in a
different file completely, but until we pick a
serialization/deserialization method, keep it in module_snapshot_ios.
Change-Id: Ie80c739c167634520d13ec920a29a80116aa3bfe
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2079196
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
UBSan was reporting reference binding to a misaligned address in Fuchsia.
Disable UBSan for this target for now just to silence the runtime
warnings, then come back and fix them.
Bug: fuchsia:46805
Change-Id: Ic5d9b35161b6d998f1ff50eb8e978c44aff9b4ef
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2068051
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Also remove MemorySnapshotWin since the code is identical to
MemorySnapshotGeneric now.
Bug: crashpad:95
Change-Id: I9a631f8eb206dd72a69158021db87e8db41c5913
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1642148
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Recent changes to GN mean that non-source files in final targets are an
error. Since they were ignored previously, this should be an NFC.
See crbug.com/gn/77 for details.
Change-Id: Ifc845a3b3b044e71ab4086ab19748adb7b4d4d08
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1632676
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Recent changes to GN require only buildable files to be included in
sources. See crbug.com/gn/77 for additional details.
Change-Id: Ie3012fa5ae68a0886819647435fecb1d9c3d7aea
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1623149
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Enable building elf_image_reader_fuzzer in Chromium.
Rename it to crashpad_elf_image_reader_fuzzer so that its clearer
where the fuzzer comes from.
Import chromium's fuzzer_test definition when building in Chromium and
make sure fuzzer is only built on Linux since it breaks fuzzer build
on Win (and maybe Mac?).
Bug: 950093
Change-Id: I8afc104d26871311b04931b82a1600614a81bfc8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1597091
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Implemented all of the interface except Context().
Bug: crashpad:10
Change-Id: If76e539fd7b995da50f83e02f095f05537f5572a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1567489
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Casey Dahlin <sadmac@google.com>
In preparation for deleting the custom CrashpadInfo reading routines in
the PEImageReader and also deleting the PEImageAnnotationsReader, this
change moves ModuleSnapshotWin to using the platform-independent
CrashpadInfoReader.
Bug: crashpad:270
Change-Id: Idad5de173200068243eacb2bb11b2d95b6438e90
Reviewed-on: https://chromium-review.googlesource.com/c/1388017
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This API was added for Kasko several years ago but that project is
defunct and this API does not appear to be used elsewhere.
Bug: crashpad:270
Change-Id: I5a409deff7c5cf4f9f552893d4a49303f3000164
Reviewed-on: https://chromium-review.googlesource.com/c/1388022
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
In preparation for deleting the PEImageAnnotationsReader (and replacing
it with the generic ImageAnnotationsReader) change the
PEImageAnnotationsReader test to be a ModuleSnapshotWin test instead.
The tests are still useful for testing the annotations on the module
snapshot.
Bug: crashpad:270
Change-Id: Ibbbc69c72ca2eb98bfae9dc9b57bf28e9d3f12e2
Reviewed-on: https://chromium-review.googlesource.com/c/1388018
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
This plumbs some of the ZX_INFO_PROCESS_MAPS information out into
MINIDUMP_MEMORY_INFO. The mapping loses some information that Zircon
provides, and some of the data that Windows would provide isn't
available (for example, AllocationProtect). But this gives a general
idea of the memory layout of the process to check for bad pointers, etc.
when inspecting crashes.
Bug: fuchsia:DX-615
Change-Id: I2d7c02be0996672253cf0b1eb6a60b0a55e6033b
Reviewed-on: https://chromium-review.googlesource.com/c/1377089
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Add a method to ProcessSnapshotMinidump to expose a similar interface
to ModuleSnapshot::CustomMinidumpStreams(). It's implemented on the
process snapshot here because there is no way to map custom minidump
streams back to a specific module. This allows implementing tests that
inspect custom user streams in minidumps.
Bug: 896019
Change-Id: I1673c342753e13d64bddcc0083ca29fa356deac7
Reviewed-on: https://chromium-review.googlesource.com/c/1271405
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
We also remove the NOTREACHED guard from ExtraMemory and just let it
return nothing (see comment for rationale). This should be the last of
the methods in ThreadSnapshotMinidump.
Bug: crashpad:10
Change-Id: If7148d3ead1ae5887da300131efc8a078b350b54
Reviewed-on: https://chromium-review.googlesource.com/c/1296806
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Casey Dahlin <sadmac@google.com>
Only partially implemented, but we can get most of the useful stuff,
including CPU Architecture.
Bug: crashpad:10
Change-Id: I727eeef5770430253a45cd046a66488f743ac25a
Reviewed-on: https://chromium-review.googlesource.com/c/1285033
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Only partially implemented, but ProcessSnapshotMinidump now returns them
appropriately.
Bug: crashpad:10
Change-Id: I44f598256965e404f62bd93e9e2efc61527298db
Reviewed-on: https://chromium-review.googlesource.com/c/1278280
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>