1709 Commits

Author SHA1 Message Date
Justin Cohen
75ea787a80 Adds plumbing for xcuitests with a placeholder test.
Also adds basic integration for EDO.

Change-Id: If3d193a4967a566b55d6d446585e2988dacad6e6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2028183
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-01-31 03:39:51 +00:00
Tao Bai
915862984c [log minidump] add option to log minidump in handler_main
- Add option to log minidump in handler_main, also add option to
  disable to dump minidump and generate report.
- Implement log minidump in CrashReportExceptionHandler.

Bug: crashpad:308
Change-Id: I8d2f7e118912011a8416f1ec36c9ee9d561d06e6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1995825
Commit-Queue: Tao Bai <michaelbai@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2020-01-30 18:06:58 +00:00
Justin Cohen
f36f46d1ec Roll crashpad/third_party/mini_chromium/mini_chromium/ 0512d4269..f58366399 (1 commit)
0512d42698..f58366399b

$ git log 0512d4269..f58366399 --date=short --no-merges --format='%ad %ae %s'
2020-01-29 justincohen Enable debug flags in debug mini chromium.

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

Change-Id: Ieb457f27b31c3717810f2be236b084127277de55
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2029649
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-01-30 16:30:48 +00:00
Justin Cohen
77baffaf93 Add iOS gn configs.
Allows more native iOS development with Xcode by auto generating all
the various configs during runhooks.

Change-Id: I840001caabc7ef656c3145b847cee5596335aa23
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2024186
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2020-01-29 15:46:32 +00:00
P.Y. Laligand
23a2da5e95 [fuchsia] Only add fdio config if it's not already present.
Change-Id: Ie5eef8fb76b7a9558791aae8572ec2c91d2e6b84
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2026287
Commit-Queue: Francois Rousseau <frousseau@google.com>
Reviewed-by: Francois Rousseau <frousseau@google.com>
2020-01-29 00:21:51 +00:00
Joshua Peraza
6c0f5ccaa8 Add NewReport::Reader to read back new reports
Change-Id: If53a63aac2b213b02619bb5277e5618c0e7842b3
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2019566
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-01-24 18:51:59 +00:00
Nico Weber
2fd16e3392 Reformat all gn files
Port of chromium-side
https://chromium-review.googlesource.com/c/chromium/src/+/1997899

Bug: chromium:1041419
Change-Id: Ic7afefa0dea024da37fe4bb0f965840a160e2166
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2015428
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-01-23 13:59:00 +00:00
Vitaly Buka
4367e9df17 Increase kAllowedOffset for non-optimized build
"init_stack_vars = true" inserts additional instructions which
usually removed by optimization if code does not rely on undefined
behaviour of uninitialized variables.
However in non-optimized build these instructions may still be present.

Fixing https://ci.chromium.org/p/chromium/builders/ci/Win10%20Tests%20x64%20%28dbg%29/12597
Related patch: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1949846

Bug: chromium:1030261
Change-Id: Ib05fa8580d4b0206f70e2dfac5e0f3a3d4389f95
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1995823
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
2020-01-13 19:08:22 +00:00
Tomasz Śniatowski
0b8741b074 Remove redundant semicolon in cpu_context_linux.h
Fix a -Wextra-semi warning in Clang when building crashpad for MIPS.

Change-Id: I53893c815de74d2503acdce24708e29096f4b0aa
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1997103
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Tomasz Śniatowski <tsniatowski@vewd.com>
2020-01-13 17:32:22 +00:00
Rohit Rao
54bbd7d0d5 Adds support for running GTests on iOS.
iOS needs to run tests from within the context of a UIApplication, and
it needs to periodically spin the runloop to ensure that the watchdog
does not kill the app for being unresponsive.

BUG=crashpad:31

Change-Id: Ia1d881e478d4f83c236b475a21529760c06100c7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1904226
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-01-07 17:08:53 +00:00
Ian Barkley-Yeung
558b7ea43f Pass --always_allow_feedback during integration tests
During ChromeOS integration tests, pass --always_allow_feedback to
crash_reporter. Most integration tests do not set metrics consent but
still want crash dumps.

Needs https://chromium-review.googlesource.com/c/chromium/src/+/1981139 as well

BUG=chromium:1037656
TEST=tast -verbose run --extrauseflags chrome_internal my_crbook ui.ChromeCrashNotLoggedInDirect

Change-Id: Ibc7af4b31da789c52aec6e668a4b192d4e20fdfc
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1981037
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
2020-01-02 18:36:23 +00:00
Vlad Tsyrklevich
c2978022d1 Update comment to match current state of MemorySnapshotGeneric
MemorySnapshotGeneric is now used on all platforms as it uses
ProcessMemory instead of templating to use a platform-specific
ProcessReader* class.

Change-Id: Ib0b6db0fac184c558f1c76a584db92e4804dfe99
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1977640
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
2019-12-20 17:29:59 +00:00
Joshua Peraza
38f4bae3ad chromeos: fix minidump-dir-for-tests flag
Bug: b/145241430
Change-Id: I766c9bcb6f0b2eaf4219dad38cdb02867bf76a2b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1976077
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-12-19 20:29:55 +00:00
Tao Bai
b411976ca5 [log minidump] add tool to encode/decode minidump log.
- This tool could compress/encode or decode/decompress the minidump
  log file, will be used by script to symbolize the crash.
- Added FileOutputStream and FileEncoder.

Bug: crashpad:308
Change-Id: I15c3e4908882a09983ec81a90e38249967c29fc4
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1968059
Commit-Queue: Tao Bai <michaelbai@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2019-12-18 22:16:48 +00:00
Joshua Peraza
4dd9124e2f linux: install handler and log errors on prctl failure
Change-Id: Iec118ce299ad9a9cd81e3dea98b25804121b5b2b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1972311
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-12-17 20:31:15 +00:00
Joshua Peraza
d3d0c8d3ca android: don't expect code addresses to be readable
Change-Id: I252a93db5f4166216664ae8f67e331fc7eed8852
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1967548
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-12-13 18:58:42 +00:00
danakj
a126f524fa Use base::BindOnce() instead of base::Bind()
R=rsesek@chromium.org

Bug: chromium:1007836
Change-Id: I1997bec5e4a499d2c200099e6cc94876a4667782
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1967540
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
2019-12-13 18:03:42 +00:00
Scott Graham
af5d5468e0 Rename FIDL tables to .c due to use of designated initializers
Will also need https://fuchsia-review.googlesource.com/c/fuchsia/+/348593 to land in the SDK to fix the bots.

Very helpful link: https://ci.chromium.org/p/crashpad/builders/try/crashpad_try_fuchsia_arm64_dbg/728

Change-Id: Iacdbb13a72d116bd579f5f10cadbe7a0b3ed7987
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1966371
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-12-13 16:46:32 +00:00
Tao Bai
fa28ef896c [log minidump] LogOutputStream implementation
Emit the received data to Android logcat in Android, and noop for
other platforms.

Bug: crashpad:308
Change-Id: I6e46e2fa8bd61f93f614ad0bfb6441a79139b04b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1958711
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2019-12-12 23:04:38 +00:00
Benjamin Wright
097395dfca [crashpad] - Replace "system-temp" with "isolated-temp"
Bug: fuchsia:25092
Change-Id: I553245cea7b4db7e414320bfed02e79531cbc4c9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1961139
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2019-12-11 01:10:20 +00:00
James Forshaw
c6153f0b6e [Windows] Add AppContainer SID to Named Pipe DACL.
This CL modifies the creation of the Named Pipe Security Descriptor to
allow access from AppContainer processes. The DACL only allows access for
the current user and SYSTEM which matches up with the auto-assigned DACL
used previously (the read-only logon SID ACE has been removed). As this
new code uses APIs from ADVAPI32 a check is made to ensure it's not being
called while the loader lock is held to avoid hitting previous similar
issues.

Bug: crashpad: 318
Change-Id: I3f9cf5c788dbadacad21c8a2d57a0188f690ac32
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1955982
Commit-Queue: James Forshaw <forshaw@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-12-10 17:16:24 +00:00
Tao Bai
3e4d6a9b7f [log minidump] Base94OutputStream implementation
Add Base94 encoding/decoding implementation and tests.

Bug: crashpad:308
Change-Id: If3f25efcb277eacd5d8cbe1d66f22919872c7d64
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1796682
Commit-Queue: Tao Bai <michaelbai@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2019-12-06 19:27:33 +00:00
Mark Mentovai
cba3dabf24 Add .gitattributes, setting “text eol=lf” or “binary” for all files
This should prevent accidental "\r\n" line endings from being introduced
again, as happened in 359fc4a1336d, fixed by 31470459b624.

Also includes:

Update mini_chromium to 0512d42698bfb47f2016ac627177c22d22b983d4

0512d42698bf Add .gitattributes, setting “text eol=lf” for all files

Change-Id: Id84c014914fec66632006ed364e2b14b4f1c175c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1953807
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2019-12-06 19:07:12 +00:00
Mark Mentovai
31470459b6 Fix line endings on files introduced in 359fc4a1336d
"\r\n" was used instead of "\n" on four new files.

No other "\r" appears in any text file, repository-wide.

Bug: crashpad:316
Change-Id: I94f5d20cd2498e76efdee6062382669362e6e53d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1954713
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-12-06 04:24:30 +00:00
Joshua Peraza
bcab7ad54c linux: handle large mapped files
Chrome on Android normally builds the handler without large file
support because support for large files varies by API level and NDK
version.

https://cs.chromium.org/chromium/src/build/config/compiler/BUILD.gn?rcl=6b5017edcd8544acbdb157086a1645ce36c03057&l=360

https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md#32_bit-and

The handler still needs to able to handle large files mapped by other
code modules.

Bug: crashpad:312
Change-Id: I1022b706797f41445650f82c425a92e6e2308618
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1954426
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-12-05 21:33:20 +00:00
Joshua Peraza
c9f089eee4 linux: update lss
Change-Id: Icb893e5fad1e94da5f401cb56d882baec8620c0b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1954243
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-12-05 21:28:20 +00:00
Rohit Rao
6b81e8173f Removes the obsolete cq.cfg file.
The authoritative version of this config now lives in "commit-queue.cfg"
on the origin/infra/config branch.

This config was migrated in:
https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1436767

BUG=916292

Change-Id: Ie49028d043775e789fb948b24485c45d168720c3
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1953363
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
2019-12-05 17:52:14 +00:00
Vitaly Buka
e01fb92aa9 Fix #elif in crrev.com/c/1949846
I was editing the patch in gerrit and looks like it undone !defined
change and I landed wrong version.

Bug: chromium:1030261
Change-Id: Ib645839bac5450fe55ecd9f3a38155022b7f6c13
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1951624
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
2019-12-04 21:58:57 +00:00
Vitaly Buka
9a312ddff5 Increase kAllowedOffset for non-optimized build
"init_stack_vars = true" inserts additional instructions which
usually removed by optimization if code does not rely on undefined
behaviour of uninitialized variables.
However in non-optimized build these instructions may still be present.

Bug: chromium:1030261
Change-Id: I85d1d0a240dcd1c29c6ff148e88d572b5dcc81d1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1949846
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
2019-12-04 19:25:59 +00:00
James Forshaw
359fc4a133 [Windows] Add checks for DLL loader lock.
This CL adds code to check if the current thread holds the DLL loader
lock. This code can be used to enforce the requirement that certain
parts of crashpad, such as process creation are not done during calls
to DllMain which can lead to deadlocks and crashes. Only one check is
current enforced, in client process creation, and only in debug builds.

Bug: crashpad: 316
Change-Id: I5757a264bbf28ce2ab88a0cd7ac9481e46428c17
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1945993
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: James Forshaw <forshaw@chromium.org>
2019-12-03 21:42:32 +00:00
Joshua Peraza
7fd5226a97 Give database settings kOwnerOnly permissions
Bug: b/145240822
Change-Id: Id3720471ce67edd981c35b62cf1d8f810899646c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1940848
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-11-27 20:50:02 +00:00
Joshua Peraza
74490f00a4 linux: roll lss and use sys_sigtimedwait/sys_sigprocmask
Bug: crashpad:265
Change-Id: I4b8f566e2a211cca96eef8a2c1098408a38bcf23
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1914840
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-11-13 22:10:54 +00:00
Joshua Peraza
2291bfa32e android, gyp: fix the build
Change-Id: If852448b5719310b73774cac635ef9c52a3efc22
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1914349
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-11-13 21:16:24 +00:00
Scott Graham
0208c1a175 fuchsia: Don't capture incorrect/unreasonably large stacks
In a stack overflow test from the Fuchsia tree, an intentional crash was
being induced that at the point it was reported to Crashpad resulted in
a stack pointer outside of the stack. This caused two problems:

- Crashpad attempted to capture that whole "thing" which could have been
  anything, and in the failing test was a 1G guard region
- The whole wrong thing could be very large, resulting in OOM when
  trying to write the minidump, which was the symptom of the bug.

Don't attempt to continue of SP isn't at least in a mapping, and don't
capture too-large regions for the stack as nothing useful can come of
that anyway.

New test added: ProcessSnapshotFuchsiaTest.InvalidStackPointer.

Bug: fuchsia:41212
Change-Id: Ifb48fd8b4b5b2f0cf10ab97e01dbd8b842368775
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1912942
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Francois Rousseau <frousseau@google.com>
2019-11-13 00:26:24 +00:00
Joshua Peraza
a8d66ae783 linux: don't set ptracer if yama doesn't exist
Change-Id: I0f2c1a1eef93151014c3f715a64ba99b63358887
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1904957
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-11-08 04:36:18 +00:00
Joshua Peraza
93f8aa8df9 posix: fix parameter name in signals test
Change-Id: I6e998571171c9a725d88a9529c73d01c62ee984f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1905146
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-11-08 04:02:38 +00:00
Rohit Rao
bd1aa246ca Starts compiling the crashpad_test_test target on iOS.
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>
2019-11-07 16:55:37 +00:00
Joshua Peraza
6dadd492b8 linux: fix proc stat reader flakiness
ProcStatReader.Threads is flaky because it relies on an internal,
imprecise measurement of boot time. The flaky test asserts that a
thread started after the main thread should have a start time >= the
main thread. The start time is returned in a timeval, with microsecond
precision, but the measurement of boot time requires two system calls
and the time between those system calls can be approximately a
microsecond. An unlucky event such as a change in system time could
make this imprecision arbitrarily bad.

This patch lets the caller of ProcStatReader.StartTime() inject the
boot time, allowing ProcStatReader to guarantee that threads have
correctly ordered time, given the same input boot time.

Bug: 1016765
Change-Id: I6e4a944a1d58c3916090bab6a4b99573e71a89fc
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1891588
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-11-07 16:54:17 +00:00
Francois Rousseau
27322abb7e [net] specify parameter name in parameterized test suite
* this renders as "HTTPTransport/HTTPTransport.ValidFormData_Gzip/http"
  instead of the default "HTTPTransport/HTTPTransport.ValidFormData_Gzip/0"
* switch the parameter type from a base::FilePath::StringType to a string

Change-Id: I19743966406f92176c566827d74a79aef5a87bb5
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1900324
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2019-11-06 01:35:18 +00:00
Scott Graham
272c4bb64e fuchsia: Add missing transformer.cc to fidl_base
Fix fidl_base build, again. Fixes broken tryjobs as seen in
https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1872188.

Change-Id: Iaec1613b3b335fac501227b7a86134309f52d7f3
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1899650
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2019-11-05 19:07:27 +00:00
Joshua Peraza
1b60c8172c commit test ssl certificate to testdata
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>
2019-11-05 17:47:01 +00:00
Mark Mentovai
cea103fb7d mac: Fix ProcessTypes.DyldImagesSelf with 10.14 SDK on 10.12
The current 10.14 SDK is numbered 101404, which is greater than
MAC_OS_X_VERSION_10_14 (101400). That was causing the test to
unintentionally fall into the “unlisted SDK” branch of the #if cascade
due to testing SDK <= MAC_OS_X_VERSION_10_14. This is corrected by
testing SDK < MAC_OS_X_VERSION_10_15 instead.

Bug: chromium:1016314, crashpad:310
Change-Id: If062e8fca92ae105924addf10c3e2fde162448cf
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1872636
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-10-23 20:36:07 +00:00
Scott Graham
b2e26bc455 fuchsia: Fix fidl_init_txn_header link error
Add missing/new fidl_base/txn_header.c to fidl_base library in Fuchsia
build. However, that transitively includes files that use static_assert
via assert.h, which is a C11 feature. Per
https://fuchsia.googlesource.com/fuchsia/+/master/docs/development/api/c.md#Language-versions-C-1
Fuchsia does not aim to support C99, so change the build setting in mini_chromium as well in
https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/1876894

Includes mini_chromium roll:
2298dbe9d0b3213720ac0e5418ad0013a19aeb5d Change cflags_c from c99 to c11
63dfdbd690244c58c1595543806bafd5e5f8aabd Adds support for codesigning iOS app bundles.
ae8e6c54b9a6ea2fd4ff64aab61227d9fad1897e Adds GN rules for ios app bundles.

Change-Id: I09c93d5b2b7ae197c8dc95b83e9c467a68ee51f1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1876893
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-10-23 20:16:37 +00:00
Joshua Peraza
661a07a41b linux: add deps for boringssl in chromium
Change-Id: Icc0acddd7218c85950874555405c8f8b5c3149dd
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1869251
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-10-18 15:37:06 +00:00
Joshua Peraza
47a342133d linux: use boringssl in chromium
Or else the uploader will check fail when uploading to https://...

Change-Id: I88a765215cc7bff5809b8effd92f4e39bebd1e5b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1860940
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-10-15 15:58:26 +00:00
Joshua Peraza
7289acb78a linux: don't assume vdso exists
AT_SYSINFO_EHDR may be defined even if no vdso is used. e.g. 32-bit ARM
processes have a vdso on 64-bit ARM cpus, but not on 32-bit cpus.

Change-Id: I4d9ce029bb47efc33ea16cb4c5c2055c1b9330c9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1860935
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-10-15 15:58:06 +00:00
Joshua Peraza
d8f85829b0 linux: fix split stack test
Previously, page_addr sometimes ended up being in the current stack
frame, causing a segfault when write protecting it. Reach another
page up the stack and add an extra stack page for wiggle room.

The test consistently fails on linux-chromeos bots:
https://ci.chromium.org/p/chromium/builders/try/linux-chromeos-rel/373920

Change-Id: I5e2aa8c54555ef559251a14b0310a24131c9f17a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1857500
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-10-12 18:39:31 +00:00
Mark Mentovai
c009b85449 Use GTEST_SKIP() instead of custom DISABLED_TEST()
Since gtest 00938b2b228f, gtest has built-in first-class support for
skipping tests, which is functionally identical (at least in Crashpad’s
usage) to the home-grown support for run-time dynamically disabled tests
introduced in Crashpad 5e9ed4cb9f69.

Use the new standard pattern, and remove all vestiges of the custom
local one.

This was done previously in 79f4a3970a64, but was reverted in
bba9d0819c12 because Chromium’s test launcher did not support
GTEST_SKIP() at the time. The deficiency is on file as
https://crbug.com/912138.

While that bug was never specifically marked as “fixed” and I haven’t
found what changed in Chromium, I do now see some use of GTEST_SKIP() in
Chromium. I also prototyped this change in Chromium at
https://chromium-review.googlesource.com/c/1854691/ and found that
GTEST_SKIP() does indeed now appear to work.

Change-Id: I13fef8fe8bfd9854a40dfa5910a3282d1a85bc45
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1855380
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-10-11 16:45:34 +00:00
Mark Mentovai
2fb4e9e6a4 mac: Update the process_types version of dyld_all_image_infos for 10.15
macOS 10.15 (“Catalina”) introduces a single new field to its
dyld_all_image_infos structure, and uses structure version 16.

macOS 10.13 and 10.14 were documented in <mach-o/dyld_images.h> as using
structure version 16, but they actually use version 15. They should have
used version 16, as they do use a structure expanded from macOS 10.12,
which also uses version 15. Previously, process_types was true to the
documentation, but now that this is known to be incorrect, it’s been
revised to reflect reality. Because two variants of the version 15
structure exist, run-time OS version detection is used to disambiguate.

Bug: crashpad:310
Test: crashpad_snapshot_test ProcessTypes.DyldImagesSelf (10.15 SDK)
Change-Id: Ibc82b6a73809949f4bbf416ece7aa955b627c573
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1852109
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2019-10-10 21:59:24 +00:00
Joshua Peraza
fe52a01df1 linux: set dumpable for all signal handlers
Change-Id: I6e3d6627332d7dd9eb029b9778f72d7af1511153
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1850234
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-10-09 18:31:41 +00:00