1759 Commits

Author SHA1 Message Date
Mark Mentovai
b71a4f1ca8 doc: Update buildbot URL
Change-Id: I7a1b6b91cb3f549904e2b930dab8becaca13085c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2144915
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-04-09 21:27:59 +00:00
Justin Cohen
b2fd7d5307 [ios] Bring up first half of UncaughtExceptionHandler.
When code raises an Objective-C exception, unwind the stack looking for
any exception handlers. If an exception handler is encountered, test to
see if it is a function known to be a catch-and-rethrow 'sinkhole'
exception handler. Various routines in UIKit and elsewhere do this, and
they obscure the exception stack, since the original throw location is
no longer present on the stack (just the re-throw) when Crashpad
captures the crash report. In the case of sinkholes, trigger an
immediate exception to capture the original stack.

The is an improvement over the alternative,
NSSetUncaughtExceptionHandler, which passes along the stack frames, but
not the stack memory contents and full exception context itself.

The details of what happens after a fatal exception is triggered are
unresolved in this CL.  For now, simply call std::terminate.

This code was inspired by chromium/src/chrome/browser/mac/
exception_processor.mm.

Bug: crashpad:31
Change-Id: Ieebc6476a0507c466c8219c10f790ec0a624e58c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2125254
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-04-08 20:57:21 +00:00
Scott Graham
de5bc33b8b fuchsia: Include reference to zx library
"library zx" used to be built in to fidlc, but is now a standalone file
(this is an SDK change). Update the build rules to adapt to this.

ref: https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket.appspot.com/8883567878548782112/+/steps/compile_with_ninja/0/stdout

FAILED: gen/fidl/include/fuchsia/sysinfo/c/client.cc gen/fidl/include/fuchsia/sysinfo/c/fidl.h gen/third_party/fuchsia/fidl/fuchsia.sysinfo/tables.c gen/third_party/fuchsia/fidl/fuchsia.sysinfo/intermediary_representation.json
python ../../third_party/fuchsia/runner.py ../../third_party/fuchsia/sdk/linux-amd64/tools/fidlc --c-header gen/fidl/include/fuchsia/sysinfo/c/fidl.h --c-client gen/fidl/include/fuchsia/sysinfo/c/client.cc --tables gen/third_party/fuchsia/fidl/fuchsia.sysinfo/tables.c --json gen/third_party/fuchsia/fidl/fuchsia.sysinfo/intermediary_representation.json --name fuchsia.sysinfo --files ../../third_party/fuchsia/sdk/linux-amd64/fidl/fuchsia.sysinfo/sysinfo.fidl
../../third_party/fuchsia/sdk/linux-amd64/fidl/fuchsia.sysinfo/sysinfo.fidl:7:7: error: Could not find library named zx. Did you include its sources with --files?
using zx;
      ^~

Bug: fuchsia:7802
Change-Id: I10c0109fd9621a19d72deb21a489c2041caeeeca
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2141019
Commit-Queue: Scott Graham <scottmg@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
2020-04-08 20:45:01 +00:00
Joshua Peraza
c4cc4e6ac9 android: initialize signal dispositions
Bionic installs signal handlers which request crash
dumps from Android's debuggerd, but there are errors
in how signals which aren't automatically re-raised
are handled on Marshmallow (API 23).

Before requesting a dump, Bionic acquires a lock to
communicate with debuggerd and expecting imminent
death, never releases it.

While handling the dump request, debuggerd allows
the dying process to continue before
ptrace-detaching it. So, when Bionic manually
re-raises a signal, it is intercepted by debuggerd
and the dying process is allowed to live.

Bionic restores SIG_DFL for the signal it's just
handled, but if a different crash signal is later
recieved, Bionic attempts to reacquire the lock to
communicate with debuggerd and blocks forever.

Disable Bionic's signal handlers for these signals
on Marshmallow.

Bug: chromium:1050178
Change-Id: Ia1fc5a24161a95931684d092ba8fee2f0dfbbdbb
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2134513
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-04-08 17:21:05 +00:00
Sukumar Mokkarala
9da2573ca9 linux: Patch for capget syscall error
Bug: crashpad:332
Change-Id: If867fd1780e4be1567048ad7fab29f5e61560aff
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2120780
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-04-03 04:19:02 +00:00
Mark Mentovai
194e23910c Change for loops to use const references where they did not previously
From cl/304219049:

Optimize C++11 range-based for loops where the variable is copied in
each iteration but it would suffice to obtain it by const reference.
This is only applied to loop variables of types that are expensive to
copy which means they are not trivially copyable or have a non-trivial
copy constructor or destructor.

To ensure that it is safe to replace the copy with a const reference,
the following heuristic is employed:
 - The loop variable is const qualified.
 - The loop variable is not const, but only const methods or operators
   are invoked on it, or it is used as const reference or value argument
   in constructors or function calls.

Change-Id: I5755eb523f60744079b0eb50424395079dcb0f02
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2132844
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-04-01 21:36:17 +00:00
Justin Cohen
e39aacbd66 Roll crashpad/third_party/mini_chromium/mini_chromium/ c426ff98e..731e08f06 (1 commit)
c426ff98e1..731e08f069

$ git log c426ff98e..731e08f06 --date=short --no-merges --format='%ad %ae %s'
2020-03-31 justincohen Strip arm64e from XCTRunner if present.

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

Change-Id: Ic682d6c98e313eaf56e58ef1eb90a65b48775f1d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2132727
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-04-01 18:40:47 +00:00
Mark Mentovai
61a4f3d7d6 mac: kern.nx is not present in 10.14.5 et seq, but NX is always enabled
This updates the comment from d3859d91fde0, which referred to 10.14.4 as
the OS version where kern.nx stoppoed working. Testing indicates that
kern.nx works in 10.13.6 17G12034 and 10.14.4 18E226. It does not work
in 10.14.5 18F132 or 10.15.4 19E266.

Bug: crashpad:295
Change-Id: Id2f222700fb626de707d60980fedbd79e62990e6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2127566
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-03-30 17:08:24 +00:00
Justin Cohen
af62d7fcf6 Correct use of -[NSString UTF8String].
Fixes the chromium presubmit error for UTF8String:
 The use of -[NSString UTF8String] is dangerous as it can return null
 even if |canBeConvertedToEncoding:NSUTF8StringEncoding| returns YES.
 Please use |SysNSStringToUTF8| instead.

Bug: crashpad:31
Change-Id: Iaf939012ea9d342f6a01af58119cef962319aefe
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2119613
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-03-26 04:19:33 +00:00
Mark Mentovai
d3859d91fd mac: kern.nx is not present in 10.14.4 et seq, but NX is always enabled
Bug: crashpad:295
Change-Id: Id1de68d402d229b43fab5e8d15b0fe23c618ce08
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2119645
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
2020-03-26 01:07:10 +00:00
Justin Cohen
faae6470cf [ios] Bring up first draft exceptions snapshot.
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>
2020-03-25 20:36:06 +00:00
Justin Cohen
d9c1ca1216 [ios] Bring up first draft system snapshot and iOS data collector.
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>
2020-03-25 20:31:06 +00:00
Justin Cohen
311a5a2fdd Fix chromium build.
Chromium's sources_assignment_filter broke the build.

Change-Id: I741ce06feafcfe7abd69f65ad9c871b66452dd83
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2117368
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-03-24 22:08:52 +00:00
Joshua Peraza
b75c578373 linux: disable arguments test on old kernels
Bug: chromium:1050178
Change-Id: Ideafa5971cbaf76fa6865f671158958e7abb3a8c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2117366
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-03-24 21:05:17 +00:00
Joshua Peraza
af2be80bdb android: configure a native test suite
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>
2020-03-23 21:54:41 +00:00
Nico Weber
2965013518 Prepare crashpad mig stuff for -Wunreachable-code in chromium_code.
Bug: chromium:346399
Change-Id: I5d93a2f6781dd4dd3483009d9c470050d490be3c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2116252
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2020-03-23 20:18:51 +00:00
Justin Cohen
4e2a190ad6 [ios] Bring up first draft thread and memory snapshot.
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>
2020-03-20 17:26:49 +00:00
John Bauman
9a31d3f8e9 Print thread state after failure to suspend
This may help us debug some issues where the thread is failing to
suspend.

Bug: b/151318587
Change-Id: I0d2d539f769ebb1cdd71606e1d23d8fa66673879
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2103411
Commit-Queue: John Bauman <jbauman@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2020-03-13 22:48:26 +00:00
Justin Cohen
6835b8e29d Roll buildtools/ afc5b798c..4164a3056 (9 commits)
afc5b798c7..4164a30562

$ git log afc5b798c..4164a3056 --date=short --no-merges --format='%ad %ae %s'
2020-03-12 agrieve Roll GN from fd3d768b..9499562d
2020-03-10 thakis roll gn 4166e9fbc1f..fd3d768bcfd4
2020-02-29 xiaohuic Clean up buildtools repo migration code
2020-02-24 thakis Revert "Roll libunwind 43bb9f8722..d999d54f4b"
2020-02-21 thakis Roll libunwind 43bb9f8722..d999d54f4b
2020-02-21 seblalancette Roll GN from 97cc440d..4166e9fb
2020-02-21 bpastene Reland: Pull libunwind, libcxx, libcxxabi from a different mirror.
2020-02-19 bpastene Revert "Pull libunwind, libcxx, libcxxabi from a different mirror."
2020-02-19 thakis Pull libunwind, libcxx, libcxxabi from a different mirror.

Created with:
  roll-dep buildtools

Change-Id: Iedee7c3de93c08999b6da8ed8c31cc2c651c5c54
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2102907
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-03-13 18:31:22 +00:00
Justin Cohen
1d75af9bf5 Fix bad iOS module casting.
Change-Id: I0f8dcd867c56c4b1476c23d280e08448d2e90795
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2097177
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-03-10 20:59:27 +00:00
Justin Cohen
b109e4ce38 [ios] Bring up first draft process and module snapshot.
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>
2020-03-05 15:42:35 +00:00
Martin Vejdarski
2091241971 Roll crashpad/third_party/mini_chromium/mini_chromium/ f8f1182ad..c426ff98e (3 commits)
f8f1182adb..c426ff98e1

$ git log f8f1182ad..c426ff98e --date=short --no-merges --format='%ad %ae %s'
2020-03-05 martin fix build issue with objc flags
2020-03-05 martin add extra flags to gn
2020-03-02 mark Don’t use the disappearing MSVC_PUSH_DISABLE_WARNING() macro

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

Change-Id: I5d49cfe778e31c47b9e153107dc79abe2a726070
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2087554
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-03-05 14:16:25 +00:00
Rohit Rao
42da41d24a Targets iPhone 8 when running tests.
The iPhone 8 simulator should be available in both Xcode 10.2 and Xcode 11.3.

BUG=None

Change-Id: I26570eb2406f67b3663ac9ecb7e7440c0f9fa70d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2085353
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
2020-03-03 20:05:10 +00:00
Jinke Fan
e1b3bd11cd Add support for Hygon Dhyana CPU
This patch is used to add support Hygon Dhyana x86
vendor id (HygonGenuine).

More details can be found on:
http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@hygon.cn

Change-Id: I53445a8a63421811401b6a6a40e664d2600a3ec8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1640959
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-03-03 18:12:33 +00:00
Joshua Peraza
7500e2ef45 linux: add fallback-modes for memfd_create
Bug: chromium:1051354
Change-Id: I5dbbb3b264c09060429db199aa9f046c2f317c48
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2080651
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-03-03 18:09:45 +00:00
Justin Cohen
3c573b54ae [ios] Fix iOS device build.
Change-Id: Ib0f5af9680b4b626df2da006789eb846cd38579d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2081269
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-03-03 02:11:41 +00:00
Mark Mentovai
11b8eb10d4 Don’t use the disappearing MSVC_PUSH_DISABLE_WARNING() macro
Bug: chromium:1053958
Change-Id: I4d3f6b5e1ea8f9433ce2db6da70f28cd4f539b7c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2081257
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-03-02 17:08:16 +00:00
Leonard Chan
8bad6f140e [UBSan] Temporarily disable UBSan for gtest and file
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>
2020-02-24 17:26:35 +00:00
Nico Weber
d632f625a2 Fix a Wrange-loop-analysis warning in crashpad.
Bug: chromium:1039697
Change-Id: I2c69b8a3ba9c070eef8ff5b8f0207311b020935f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2069637
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2020-02-23 12:49:09 +00:00
Leonard Chan
0c20aeabd3 [UBSan] Temporarily disable UBSan for snapshot and minidump
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>
2020-02-21 21:20:59 +00:00
Yilong Li
f79cba47ba [lsan][crashpad] Suppress leak sanitizer on crashpad_test.
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>
2020-02-21 06:36:08 +00:00
Roland McGrath
22701bb0e4 fuchsia: Use zx_system_get_version_string
The new API replaces zx_system_get_version and is simpler.

Bug: fuchsia:45640
Change-Id: Ibc47703aba0e87e55265608b517e5953eada182f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2063908
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2020-02-19 04:43:35 +00:00
Justin Cohen
9ed8290547 Bring up skeleton crashpad_client_ios.
First steps at bringing up the crashpad_client on iOS.  Also updates
the XCUITest to trigger various crashes, with some swizzling
necessary to allow crashes.

Change-Id: I87dd36bed1c052b509d14bfa29679ed81e58a377
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2039470
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
2020-02-18 20:03:41 +00:00
Joshua Peraza
faed21a286 linux: Log register sizes on mismatch
Bug:1051354
Change-Id: Ia7731a87420e61756b61d109f9c69970ec27c6cb
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2062776
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-02-18 19:38:58 +00:00
Joshua Peraza
07812f5bd6 android: fix the gyp build
Change-Id: Ic54fd61258f4ea5b3aaa83a252faa0053ca1f552
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2062773
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-02-18 19:24:21 +00:00
Tao Bai
5a8c228641 Add document for base94_encoder
- Also fix the command line issue

Bug: crashpad:308
Change-Id: I2cace85f472acd049c1916b894c6ec36fe7fcc56
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2048267
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Tao Bai <michaelbai@chromium.org>
2020-02-11 00:11:25 +00:00
Brian Sheedy
ff1036aa60 Remove failing thread suspend DCHECK
Removes a failing DCHECK in process_reader_win.cc caused by a race
condition with a thread being injected into a process whose existing
threads are already suspended.

Bug: chromium:1007013
Change-Id: Ifa569220b28e8e2e5dfa6c32b2be4c57f61076b3
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2047803
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
2020-02-10 20:12:15 +00:00
Nico Weber
7ed4d5c454 arm: Properly mark _ZN8crashpad14CaptureContextEP10ucontext_t as %function
lld wants to remove bl/blx substitution for non-function symbols
(https://reviews.llvm.org/D73542). GNU ld apparently already doesn't
do it.

Since _ZN8crashpad14CaptureContextEP10ucontext_t wasn't marked as a function,
chromium's thumb code would then branch without mode transition into
crashpads non-thumb assembly (in arm32).

So mark the symbol as function, so that things work even if that patch
relands. This should also make things work with GNU ld, though I haven't
verified that it was broken before and works now.

I also did this for aarch64 since it seems like The Right Thing To Do
(assuming the assembler accepts it, which I also haven't checked --
the CQ will hopefully check that).

Bug: chromium:1049649
Change-Id: I3452c16f0d52a2dc0397fd3d60d06b5c39a4b524
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2044144
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2020-02-07 23:42:19 +00:00
Jan Wilken Dörrie
52ddeac77c Don't implicitly construct StringPiece from nullptr
This change implements the crashpad changes from
https://crrev.com/c/2027791 upstream.

Bug: chromium:1049498
Change-Id: I59b920d878b080d41db32bf0305d3d8f3d4f47c9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2042712
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-02-07 21:57:09 +00:00
Ian Barkley-Yeung
5779e638e1 Note that uploads consent is ignored on ChromeOS
Note that upload consent is ignored if --use-cros-crash-reporter is
present, which it will be if invoked by Chrome on ChromeOS.

BUG=chromium:1037656
TEST=None

Change-Id: I2dcea736de40a082b477f21d46c3ed01f1d91699
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2042317
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
2020-02-06 23:35:21 +00:00
Rohit Rao
cad958a833 Roll buildtools/ 6b3e658d6..afc5b798c (9 commits)
6b3e658d6f..afc5b798c7

$ git log 6b3e658d6..afc5b798c --date=short --no-merges --format='%ad %ae %s'
2020-01-28 thakis Roll GN 83dad00a:97cc440d
2020-01-28 thakis Reformat remaining gn files.
2020-01-21 sdefresne Roll GN 0c5557d173..83dad00afb
2020-01-16 thakis Reformat all gn files in /buildtools/third_party/libc++.
2020-01-16 felipesalazar Include cxa_thread_atexit on linux targets.
2020-01-13 thakis Roll GN a5bcbd726a..0c5557d17
2020-01-08 bpastene Update //buildtools/README.txt after it was merged into chromium.
2019-12-31 agable Roll GN from 6feb5599..a5bcbd72
2019-12-13 chouinard Roll GN from ad9e442d..6feb5599

Created with:
  roll-dep buildtools

Change-Id: Ifdfa2dae072115c18ce859620ed01743cac312f9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2036509
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
2020-02-04 20:05:25 +00:00
Rohit Rao
e9885ee348 Roll crashpad/third_party/mini_chromium/mini_chromium/ 0a3a80b04..f8f1182ad (1 commit)
0a3a80b04b..f8f1182adb

$ git log 0a3a80b04..f8f1182ad --date=short --no-merges --format='%ad %ae %s'
2020-02-04 rohitrao Explicitly specify lib_switch and lib_dir_switch in the msvc toolchain.

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

Change-Id: Id587cccedc77f26625d6d89a2205130db5b4ca43
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2037750
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
2020-02-04 19:57:15 +00:00
Rohit Rao
c094a11582 Roll buildtools/ eda23acab..6b3e658d6 (29 commits; 6 trivial rolls)
eda23acabd..6b3e658d6f

$ git log eda23acab..6b3e658d6 --date=short --no-merges --format='%ad %ae %s'
2019-11-18 xiaohuic Reland: Roll src/buildtools/third_party/libc++/trunk/ 5938e0582..78d6a7767 (333 commits)
2019-10-28 xiaohuic Revert "Roll src/buildtools/third_party/libc++/trunk/ 5938e0582..78d6a7767 (333 commits)"
2019-09-13 hnakashima Add exception for libassistant to import checker.
2019-09-10 dpranke Add a COMPONENT entry (Build) for //buildtools.
2019-09-10 dpranke Roll GN from 152c5144..ad9e442d
2019-07-25 thomasanderson List natvis files as inputs
2019-07-23 tikuta Roll GN from 972ed755 to 152c5144
2019-07-19 tsniatowski ensure_gn_version.py: don't die if existing gn is very old
2019-07-16 bratell Before trying to overwrite the gn binary, make it writable
2019-07-12 vapier ensure_gn_version.py: reinstall if tool is missing
2019-07-11 vapier ensure_gn_version.py: fix exception printing
2019-06-24 brettw Roll GN from 8c7f4910 to 972ed755
2019-06-21 thomasanderson Reland "Roll GN from 81ee1967 to 8c7f4910"
2019-06-17 sdy Revert "Roll GN from 81ee1967 to 8c7f4910"
2019-06-16 thomasanderson Roll GN from 81ee1967 to 8c7f4910
2019-06-14 mstensho Revert "Roll src/buildtools/third_party/libc++/trunk/ 5938e0582..ad464887b (53 commits)"
2019-06-13 mstensho Revert "Roll src/buildtools/third_party/libc++/trunk/ 5938e0582..78822a685 (48 commits)"
2019-06-07 oysteine Tracing: Moved the tracing sampling profiler to the tracing service
2019-05-23 wychen Exclude AndroidStudioDefault folder in Java import checking
2019-05-19 rsesek Roll GN from 64b846c9 to 81ee1967.
2019-05-13 jbudorick checkdeps: encode input to os.walk as utf-8.
2019-04-03 tikuta Roll GN from r1496 (0790d304) to r1555 (64b846c9)
2019-03-29 dpranke Revert "Roll GN from r1496 (0790d304) to r1546 (b85982b3)"

Created with:
  roll-dep buildtools

Change-Id: I9d0c41177307af404768d3c4e8909364f7fa6a3e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2036534
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
2020-02-04 16:24:54 +00:00
Rohit Rao
b97e77bcf5 Roll buildtools/ 62f9eb0d6..eda23acab (11 commits; 2 trivial rolls)
62f9eb0d64..eda23acabd

$ git log 62f9eb0d6..eda23acab --date=short --no-merges --format='%ad %ae %s'
2019-03-28 dpranke Roll GN from r1496 (0790d304) to r1546 (b85982b3)
2019-03-27 thomasanderson Enable in-tree libc++ builds on iOS
2019-03-27 raul Support Python 3 in //buildtools/ensure_gn_version.py
2019-03-22 dpranke Add ensure_gn_version.py and DEPS hook.
2019-03-20 thomasanderson Roll libc++ to r356574
2019-03-19 tikuta [buildtools] update .gitignore for CIPD
2019-03-18 olivierrobin Fetch gn based on the host OS.
2019-03-15 thomasanderson Set WINVER to WIN7 for libc++
2019-03-15 dpranke Use CIPD packages for GN instead of GCS.

Created with:
  roll-dep buildtools

This rolls buildtools to a commit that pulls GN via CIPD and updates
DEPS to stop downloading GN from GCS.

Change-Id: Ic148c5ef380168ced0f8390668dcbf0a610304ba
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2036530
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
2020-02-03 20:23:38 +00:00
Justin Cohen
56ec176fda Fix Chromium checkperms.py has shebang but not executable bit error.
Change-Id: I0fc5d853a38f186bba9937d537a95db37e0604ac
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2032978
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-02-03 18:37:28 +00:00
Rohit Rao
39a319d6a7 Roll buildtools/ 3e50219fc..62f9eb0d6 (8 commits)
3e50219fc4..62f9eb0d64

$ git log 3e50219fc..62f9eb0d6 --date=short --no-merges --format='%ad %ae %s'
2019-03-15 dpranke Add presubmit checks for //buildtools/DEPS entries.
2019-03-14 thomasanderson Clean up visibility for lib{c++,c++abi,unwind} and common_deps targets
2019-03-13 wez Revert "Move fuchsia libunwind dependency to common_deps"
2019-03-13 dpranke Reformat DEPS files to use single-quotes consistently.
2019-03-13 thomasanderson Correct libcxx{abi} revision in buildtools/DEPS
2019-03-13 thomasanderson Move fuchsia libunwind dependency to common_deps
2019-03-11 thomasanderson Roll libc++ to 355829
2019-03-06 thomasanderson Roll libc++ to 22d3f6dd

Created with:
  roll-dep buildtools

This rolls buildtools to the commit just before GN switched from GCS to
CIPD.  In a followup, I'll roll one more commit and switch crashpad to
pulling GN via CIPD.

Change-Id: I11081716d76cb18df5f1475ddcb8e58dc069a7f4
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2033607
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-02-03 18:22:58 +00:00
Tao Bai
e386d703d6 Fix typo in handler_main
Bug: crashpad:308
Change-Id: I1b8124a8ad7c66376ce1c028959f11d5e84c7121
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2033431
Commit-Queue: Tao Bai <michaelbai@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2020-01-31 22:54:24 +00:00
Rohit Rao
46ad005e92 Updates run_tests.py to support testing on iOS.
Tests are run by creating an xctestrun file in a temp directory and then
invoking "xcodebuild test-without-building".  Tests run on the latest
OS version (the default for the running version of Xcode) on iPhone X.

Bug: crashpad:317
Change-Id: If9f34f8798fd4c2a02fecca180913e8f86011304
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2033606
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
2020-01-31 21:00:14 +00:00
Rohit Rao
39116ab723 Adds support for running iOS unittests via XCTest.
Using XCTest allows us to drive tests from the commandline via
xcodebuild, and it also simplifies running tests on physical devices.

Tests put themselves into "XCTest-mode" if the
"XCTestConfigurationFilePath" environment variable is present.  This
variable is only set when XCTests are running.

Change-Id: If55199a7470f0479f107097eef1dfb1a705015e9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2033427
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-01-31 20:14:04 +00:00
Rohit Rao
3b007333a0 Roll crashpad/third_party/mini_chromium/mini_chromium/ f58366399..0a3a80b04 (2 commits)
f58366399b..0a3a80b04b

$ git log f58366399..0a3a80b04 --date=short --no-merges --format='%ad %ae %s'
2020-01-31 rohitrao Adds support for ios_xctest_test.
2020-01-31 justincohen Sign iOS apps on simulator too.

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium
R=0a3a80b04b3f8b1268877fd376954a8af1480171@chromium.org

Bug: crashpad:317
Change-Id: I3dedbb7cde03245fbcdacefae41a0f5fb965859d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2033430
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
2020-01-31 18:20:25 +00:00