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>
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>
Fuchsia is undergoing a change to how programs are run and the Crashpad
tests must be migrated to the new system.
Bug: fuchsia:102371
TESTED=`fx test crashpad-test` (540 passing, 1 skipped)
Change-Id: I4daf7d160045b28b876a5f1aa93b0bd596461e0d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3817783
Commit-Queue: Alex Pankhurst <pankhurst@google.com>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Make the `crashpad-test` package hermetic and describe a correct build
graph by explicitly expressing dependency edges to components. Inject
component dependencies from the hermetic package in integration tests.
Bug: fuchsia:84248
Change-Id: I20915acf6171b532b2c94941f33dc8eb90fb6776
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3197800
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>
* Crashpash has a few DEATH tests that will FATAL
Fixed: fuchsia:77967
Change-Id: Ifa4326e265d752efaedd6df91f1b6ee61a1e36c1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2937542
Commit-Queue: Francois Rousseau <frousseau@google.com>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Bug: fuchsia:65068
Test: Ran crashpad-test on device.
Test: fx shell crashpad_database_util
Change-Id: I4192030623fc85da9215039424e0bbec7eef8e30
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2758252
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@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>
We'll indirect through this group while we rename crashpad{_,-}tests.
Bug: fuchsia:22679
Change-Id: Ic4ca73ecbd6d3e2776a7b7ee8bbbd5012459be52
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2315003
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Commit-Queue: Tamir Duberstein <tamird@google.com>
Chromium relies on a global gn sources assignment filter, even though
it’s kind of discouraged. Crashpad doesn’t use this, instead selecting
which files to build entirely with the logic in its .gn files. In some
cases, Chromium’s filters prevent _linux files from building on Android,
and _mac files from building on iOS, even though Crashpad’s build has
explicitly requested these inclusions. To overcome this problem,
clear the gn sources_assignment_filter in all of Crashpad’s own .gn
files when building in Chromium.
Change-Id: Iab0af29f4e5aff4be8eec2ee12b2e3f991c0a86d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2285959
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
This was indvertently removed in ea4af71c2ac7, which should have enabled
util tests on iOS, the only platform they had been disabled on.
Change-Id: Id0d618c7268d5db21c2fd32a5f49c1770958d6d7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2286509
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@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>
* Fuchsia only uses Crashpad for minidump generation, report database
and report upload, not for the actual exception handling so it does
not need a handler class
* the current handler class didn't have tests anyway
* Chromium on Fuchsia relies on the platform exception handling instead
of rolling its own Crashpad exception handler
* this avoids us having to maintain an exception handler in another repo
* this removes the last FIDL dependency in Crashpad
TESTED=`fx test crashpad_test`
Change-Id: Ie3998f709e7cc4252dd551882a23b337864da85e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2165638
Commit-Queue: Francois Rousseau <frousseau@google.com>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Most Android tests in Chromium's infrastructure are
launched from an APK, but that's not appropriate for
Crashpad where many things expect to be run in a
plain executable.
Bug: chromium:1050178
Change-Id: I6eeb3f5e4889193e5bbe2a3bad2cd99a18e970ba
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2112342
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@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>
These should be the remaining instances of UB errors we see.
Bug: fuchsia:46805
Change-Id: Id8285386fd6cb52518f6076ddb79ac60025f9f87
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2067754
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@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>
Leak sanitizer detected bugs on the above tests. We suppress
the leak sanitizer on the leaky targets for now, and these leaks
need to be fixed to fully enable leak detector.
Bug: fuchsia:46559
Change-Id: I0bd7a43cfefc0d4ac213651de6dceea4404c243b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2067412
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Brings up the subset of tests that pass on iOS without any modifications.
Additional tests will be added later as they are updated to pass on iOS.
Excludes non-compiling targets from the iOS build so that the default target
compiles cleanly.
Rolls mini_chromium to cdab1e6263ec7f3f61763efc1dac863f8dc07c80.
2019-11-01 rohitrao Adds GN support for XCTest on iOS.
2019-10-29 rohitrao Fixes for iOS compilation and running on iOS devices.
BUG=crashpad:31
Change-Id: I918f10fc941b37fa89b08ce87828dd4299437096
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1895905
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Chromium requires build artifacts to be generated deterministically so
commit a long-lived (10 years) test certificate to the repository.
Change-Id: I7a6e2441f506196ca58fbbf757648fa0ac70bc9a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1872188
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
I’m working on something that I’m not ready to share, but maintaining
these compat headers in my local branch is becoming annoying because
“git cl format” keeps reformatting them since they were added since my
local branch point.
Because these headers are non-trivial, they’re brought nearly unmodified
from upstream into third_party, with forwarding from the appropriate
locations in compat.
<elf.h> comes from glibc 2.29 (2019-01-31) and was modified to remove
the #include of <features.h> and to replace the use of __BEGIN_DECLS and
__END_DECLS with the proper conditional extern "C" construct.
<mach-o/loader.h> comes from xnu 4903.221.2 (macOS 10.14.1, 2018-10-30)
and was modified to remove the unused #includes of
<mach/machine/thread_status.h> and <architecture/byte_order.h>. Rather
than taking <mach/machine.h> and <mach/vm_prot.h> with a spider web of
other dependencies from xnu, compat has cut-back versions of these
headers that provide only the required typedefs.
This also includes an update of apple_cf to 1153.18 (OS X 10.10.3,
2015-04-08), the last public release of CF-Lite. The change doesn’t do
much for our purposes, but it restores the file to an Apple-shipped
state, trailing whitespace and all.
This also canonically formats BUILD.gn. 48ee086ca4c4c didn’t format it.
Change-Id: Ib4f28ad53d9757bd0eed838e148c51172bfe30b1
Reviewed-on: https://chromium-review.googlesource.com/c/1489795
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
In the Fuchsia tree, tests can now be run via `fx run-test crashpad_test`.
Bug: crashpad:196
Change-Id: I427cde7090b00b46c9d6a948664701f98b014e9d
Reviewed-on: https://chromium-review.googlesource.com/c/1481811
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Francois Rousseau <frousseau@google.com>
Test: /system/test/crashpad_tests successfully ran locally
Change-Id: Iefefc1728444205efee5d22cbbd63a19869609df
Reviewed-on: https://chromium-review.googlesource.com/c/1259447
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
This is a follow-up to e6f26587e435.
Bug: DX-382
Change-Id: I3116ea5dd2eca33961465d62c9200aa8dd1baf5d
Reviewed-on: https://chromium-review.googlesource.com/1173339
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Bug: crashpad:196
Change-Id: I18f7686a9b5127143501c2b21663d80aae3d1f54
Reviewed-on: https://chromium-review.googlesource.com/1100494
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
The libraries key is deprecated. The new loadable_modules key is the right
thing to use. The dependencies should not specify the toolchain.
Change-Id: I2f218adce96b7161a5a0097f84c7ed6b0c87e3bd
Reviewed-on: https://chromium-review.googlesource.com/1071067
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
The integration into the Fuchsia tree is still being negotiated, but
I've added crashsvc on that side
https://fuchsia.googlesource.com/zircon/+/HEAD/system/core/crashsvc/crashsvc.cpp,
which handles exceptions and spawns something to actually deal with the
crashed process. This means that there's no resident thing, so it seems
simplest to use handler/crash_report_exception_handler directly, rather
than add another wrapper binary. At some point it may make sense to roll
this functionality back into Crashpad upstream, we'll see how it
evolves.
Additionally, the "normal" crashpad_handler model may still be necessary
if Chrome wants to use a copy locally (rather than the system handler).
To accomplish this:
- Split crashpad_handler and crashpad_database_util packages so
crashpad_database_util can still be included into the system image for
debugging.
- Add handle-based version of HandleException() to
CrashReportExceptionHandler (and also remove the "type" argument because
I've come around to realizing there's no point to it, finally. :)
Bug: crashpad:196
Change-Id: I38872183ee3691c0938c5b761e6b73c80019f355
Reviewed-on: https://chromium-review.googlesource.com/1057833
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
In my ongoing quest to break the Fuchsia tree in as many ways as
possible...
All binaries found in /system/test are automatically run. So when
http_transport_test_server and
crashpad_test_test_multiprocess_exec_test_child are unexpectedly run
they just hang, breaking the overall test run. To avoid this, package
them into a subdirectory which is the preferred solution.
Bug: crashpad:196
Change-Id: If79c2c8c5493214fddbb2fa6de6f69ee0c78d9bd
Reviewed-on: https://chromium-review.googlesource.com/1054782
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Not surprisingly, x64-shared did not work in the arm64 build. 9_9
I've asked the Fuchsia toolchain team if this is the correct way to use
the toolchain definition as it seems a bit awkward, but for now it seems
like the only way to depend on the .so files in packages.
Bug: crashpad:196
Change-Id: I998bf4feffd9499276bfc29229e5aadc1ae976f2
Reviewed-on: https://chromium-review.googlesource.com/1054487
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Packaged test running seems to be a ways off, but with a bit of path
fiddling in test_paths.cc we can actually use the paths where the tests
are copied, so do that instead to get all the tests re-enabled. The
setup in BUILD.gn should be mostly-useful once packaging is working as
all helper/data files will need to specified there anyway.
Also, attempted fix to flaky behaviour in
ProcessReaderFuchsia.ChildThreads exposed because the tests are now
being run. zx_object_wait_many() waits on *any* of the objects, not
*all* of them. Derp!
And finally, for the same test, work around some unintuitive behaviour
in zx_task_suspend(), in particular that the thread will not be
suspended for the purpose of reading registers right away, but instead
only "sometime later", which appears in pratice to be after the next
context switch. Have ScopedTaskSuspend block for a while to try to
ensure the registers become readble, and if they don't, at least fail
noisily at that point.
Bug: crashpad:196
Change-Id: I01fb3590ede96301c941c2a88eba47fdbfe74ea7
Reviewed-on: https://chromium-review.googlesource.com/1053797
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Also, add both crashpad_handler and crashpad_database_util to "binaries"
which causes them to be included in the final system image.
Bug: crashpad:196
Change-Id: Iaf1bf7bbc0a5370695372fd01d7c3da35906dfc3
Reviewed-on: https://chromium-review.googlesource.com/1050576
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
- Use "deprecated_system_image" (merging from downstream)
- Add package for crashpad_handler
- Depend on launchpad target instead of a lib when in tree, as launchpad
is no longer in the sysroot.
- Don't try to remove the -Wexit_time_destructors unless building
standalone, when it's added by mini_chromiums BUILDCONFIG.gn
Bug: crashpad:196
Change-Id: I08e0faaa989346b078a41896eb4ace69e7b1bcdc
Reviewed-on: https://chromium-review.googlesource.com/1026514
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
third_party/googletest has been added to the Fuchsia manifest now (which
is a recent copy of googletest that includes googlemock). The BUILD.gn
file isn't there yet, but is in progress.
With these changes, all targets build in-Fuchsia once the googletest
BUILD.gn file lands.
Bug: crashpad:196
Change-Id: I34d2d7046dd2762b4d1f4873be97258df32adddf
Reviewed-on: https://chromium-review.googlesource.com/861242
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
In doing standalone bringup of Crashpad targeting Fuchsia, it seemed
tidy to keep the same literal paths to the dependencies that Chromium
needed and add stubs/forwarding to build/secondary in the Crashpad tree
as required to make those work.
However, when trying to build Crashpad in the Fuchsia tree itself, that
would require adding forwarding files to the Fuchsia tree to match the
Chromium directory structure, which would be awkward. Instead, have
explicit dependencies in the Crashpad tree that select the locations
for various dependencies.
Bug: crashpad:79, crashpad:196
Change-Id: Ib506839f9c97d8ef823663cdc733cbdcfa126139
Reviewed-on: https://chromium-review.googlesource.com/826025
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
- Correctly sets target_cpu and current_cpu so correct toolchain
can be used on Fuchsia.
- Introduces GN argument "crashpad_in_chromium" which defaults to
false. Used to set CRASHPAD_IN_CHROMIUM define, determine which
zlib path to use, and how to package the test targets into
binaries (one big one in Chromium, separate in Crashpad).
Bug: crashpad:79, crashpad:196
Change-Id: If6560dc064308ed6f8bf7c75cf74f684a3522e8b
Reviewed-on: https://chromium-review.googlesource.com/797354
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>