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>
"\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>
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>
"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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
HandlerMain() consumes argv[0] as the name for itself. Arguments
before the class name are consumed by app_process when using a Java
handler. Re-insert app_process for HandlerMain() to consume as the
program name or else it will consume the next real argument.
Bug: chromium:1011145
Change-Id: Id7090db36cc382a9fdba49b9259dbbce3a9bcc5c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1841974
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
It turns out it's frequently convenient to only grab one of these at a time.
Change-Id: Ie4a05583a5c875163154efc485d57a014101cc16
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1838011
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
The metrics recording signal handler doesn't need to be re-installed
on Linux because the handler installed by StartHandler() restores the
previously installed handler by default. Reinstalling the metrics
handler results in a crash dump loop in which each signal handler
restores the other.
Change-Id: Ieef40c74bfc69f6e0caef9809f33cfcaa10f0d03
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1832153
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
When all Crashpad clients have closed their crash handling sockets,
the handler's recvmsg() returns 0 and doesn't include any credentials.
Silence error logs for this normally occurring case.
Change-Id: I56acf3b38c8e95a9bbaa9bff04e0a6859a194e66
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1816286
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This change stops IsRegularFile and IsDirectory from logging
an error in the instance that a file or directory cannot be found.
Change-Id: I9f3c409933245708db775f566a27f5e49b2c71f3
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1795924
Commit-Queue: Francois Rousseau <frousseau@google.com>
Reviewed-by: Scott Graham <scottmg@chromium.org>
This patch updates gyp_crashpad_android.py to function with NDK r20,
removes the requirement to generate a standalone toolchain, and updates
documentation on building for Android.
Also some gyp build fixes.
Change-Id: Ide338417ab2a21eca7a4bf42c1fb834e5639c186
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1798746
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This change add function to pass a file directory to Chrome OS's
crash_reporter to write minidumps to. This is used for tests.
BUG=chromium:944123
Change-Id: Ia61955d5ec671c61adde14e61dc72e4be32e389f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1775290
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This is the 1st patch for logging minidump in Android. it adds
OutputStream interface and zlib implementation for output pipline.
Bug: crashpad:308
Change-Id: I4738b8f223886049e6e259b9b25c00e5120156e5
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1745355
Commit-Queue: Tao Bai <michaelbai@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This allows partial reading of the current process (e.g. modules or
CrashpadInfo), even though the memory map read (and so thread retrieval)
will fail if ProcessSnapshotFuchsia is used on the current process.
This is a follow up to
db6f51d3fc
which broke the CrashpadInfoClientOptions.* tests.
Bug: fuchsia:34598
Change-Id: Ifa17b4dbefcd198ff67ecea91f946cfa2439ca4c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1776936
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>