2057 Commits

Author SHA1 Message Date
Robert Sesek
10e82d5318 mac: Make crashpad build with the 12.0 SDK
The size of dyld_all_image_infos didn't change, but the last 128 bit
of `reserved` moved out of `reserved` and got names.

On 64-bit, that's straightforward -- just move two uint64s out of the
array into fields.

On 32-bit, it's fairly awkward: It's 4 of the uintptr_t `reserved`
array, which means `UIntPtr, reserved, [4]` would have to diverge
between 32-bit and 64-bit, and also shared_cache_fs_obj_id would
straddle the `end_v14` boundary. Since macOS 12.0 doesn't support
32-bit builds, just punt on this for 32-bit. (This might possibly
mean that crashpad-on-apple-watch might not compile, but that's
a build configuration that doesn't exist.)

See comment 9 and 6 on the bug.

Bug: crashpad:375, chromium:1265179
Change-Id: I221af20c59c30a8176d5685d3f5e84aaf3de9afe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3253742
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Message-Id: Merged from chromium 83a01b8e2cd2d4d96b0e298d012bb3a2bd93c64f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3293642
Commit-Queue: Robert Sesek <rsesek@chromium.org>
2021-11-19 21:22:55 +00:00
Robert Sesek
c8edcf1bb8 Split util/net files into a separate static_library target.
Only the handler uses util/net. After
8342e6bd613a5b2e44eca1d74288e3115ccef139, the introduction of an
Objective-C class caused Chromium to emit duplicate class defintion
warnings in the component build.

Bug: chromium:1270609
Change-Id: I2770528347aef406bb21a79d295f702498f7b37e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3290276
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-19 20:34:25 +00:00
Justin Cohen
92f6c21242 Retry UploadReport on http upload failures.
This implements a per-report retry rate limit (as opposed to per upload
rate limit in ShouldRateLimitUpload). When a report upload ends in a
retry state, an in-memory only timestamp is stored with the next
possible retry time. This timestamp is a backoff from the main thread
work interval, doubling on each attemt. Because this is only stored in
memory, on restart reports in the retry state will always be tried
once, and then fall back into the next backoff. This continues until
5 retry attempts are reached.

Change-Id: Ibde8855a8a9f0743f0b0bd4d5e3de8a45c64bcb6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3087723
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-11-19 19:58:55 +00:00
Alex Gough
70e4327a73 Revert "Reland "Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0"""""
This reverts commit 6383b8d2a71bc5825bb0d294fab59985fa460d9d.

Reason for revert: https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8830178135765256705/+/u/RECIPE_CRASH__Uncaught_exception_/logging

Seem like later stages are not ready for the json, or we need to massage a path somewhere. Will investigate.

Original change's description:
> Reland "Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0""""
>
> https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3290913
> should now correctly locate the new json environments that this SDK cipd
> package introduces (I have manually downloaded old and new packages
> and verified).
>
> This is a reland of e5e47bc277532ae109a444cbb3646977c93fc077
>
> Original change's description:
> > Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0"""
> >
> > This is a reland of 3dc913b12b4853ef620495a74081dd15fca8dc5e
> >
> > Previous attempt failed as the recipe helper in depot tools did not
> > understand the new cipd win sdk layout and failed at the
> > 'SetEnv.target.json' step.
> > https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8831436994854248129/+/u/read_SetEnv.x86.json/stdout
> >
> > This should be addressed once
> > https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3283800
> > is rolled into the bot infrastructure.
> >
> > > This is a reland of 44f566832da48b25c09ee83d4221a9c57f359a82
> > >
> > > The proper format for this sort of property is:
> > >
> > >     properties["$depot_tools/windows_sdk"] = {
> > >         "version": "uploaded:2021-04-28",
> > >     }
> > >
> > > rather than the nested version we had before.
> > >
> > > Original change's description:
> > > > Reland "Bump Windows SDK to 10.0.19041.0"
> > > >
> > > > This is a reland of 020da53ac84de675c8adae5b512f4257adc9dfe3
> > > >
> > > > Original change's description:
> > > > > Bump Windows SDK to 10.0.19041.0
> > > > >
> > > > > Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> > > > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> > > > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > > > > Commit-Queue: Mark Mentovai <mark@chromium.org>
> > > >
> > > > Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
> > > > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > >
> > > Change-Id: Iafb40bd8799dbfea9308f19e3c6e7568bcba82df
> > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260757
> > > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > > Bug: crashpad:
> >
> > Bug: 1250098
> > Change-Id: Ia3fa460e7054c85456bca37478b03c60906b36a9
> > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3286783
> > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > Commit-Queue: Alex Gough <ajgo@chromium.org>
>
> Bug: 1250098
> Change-Id: I6f278db20c440b5dd9952281411723706aa0af2b
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3292209
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Alex Gough <ajgo@chromium.org>

Bug: 1250098
Change-Id: I58ca7c64541832cc00690729b907b210eb583895
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3292345
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-11-19 01:01:25 +00:00
Alex Gough
6383b8d2a7 Reland "Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0""""
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3290913
should now correctly locate the new json environments that this SDK cipd
package introduces (I have manually downloaded old and new packages
and verified).

This is a reland of e5e47bc277532ae109a444cbb3646977c93fc077

Original change's description:
> Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0"""
>
> This is a reland of 3dc913b12b4853ef620495a74081dd15fca8dc5e
>
> Previous attempt failed as the recipe helper in depot tools did not
> understand the new cipd win sdk layout and failed at the
> 'SetEnv.target.json' step.
> https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8831436994854248129/+/u/read_SetEnv.x86.json/stdout
>
> This should be addressed once
> https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3283800
> is rolled into the bot infrastructure.
>
> > This is a reland of 44f566832da48b25c09ee83d4221a9c57f359a82
> >
> > The proper format for this sort of property is:
> >
> >     properties["$depot_tools/windows_sdk"] = {
> >         "version": "uploaded:2021-04-28",
> >     }
> >
> > rather than the nested version we had before.
> >
> > Original change's description:
> > > Reland "Bump Windows SDK to 10.0.19041.0"
> > >
> > > This is a reland of 020da53ac84de675c8adae5b512f4257adc9dfe3
> > >
> > > Original change's description:
> > > > Bump Windows SDK to 10.0.19041.0
> > > >
> > > > Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> > > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > > > Commit-Queue: Mark Mentovai <mark@chromium.org>
> > >
> > > Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
> > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
> > > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> >
> > Change-Id: Iafb40bd8799dbfea9308f19e3c6e7568bcba82df
> > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260757
> > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > Bug: crashpad:
>
> Bug: 1250098
> Change-Id: Ia3fa460e7054c85456bca37478b03c60906b36a9
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3286783
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Alex Gough <ajgo@chromium.org>

Bug: 1250098
Change-Id: I6f278db20c440b5dd9952281411723706aa0af2b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3292209
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-11-19 00:21:51 +00:00
Alex Gough
801e7e7021 Revert "Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0""""
This reverts commit e5e47bc277532ae109a444cbb3646977c93fc077.

Reason for revert: depot_tools winapi recipe needs another minor change.

https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8830288168302335601/+/u/read_SetEnv_json/stdout?format=raw

https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8830288168302335601/+/u/read_SetEnv_json/stdout?format=raw

Original change's description:
> Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0"""
>
> This is a reland of 3dc913b12b4853ef620495a74081dd15fca8dc5e
>
> Previous attempt failed as the recipe helper in depot tools did not
> understand the new cipd win sdk layout and failed at the
> 'SetEnv.target.json' step.
> https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8831436994854248129/+/u/read_SetEnv.x86.json/stdout
>
> This should be addressed once
> https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3283800
> is rolled into the bot infrastructure.
>
> > This is a reland of 44f566832da48b25c09ee83d4221a9c57f359a82
> >
> > The proper format for this sort of property is:
> >
> >     properties["$depot_tools/windows_sdk"] = {
> >         "version": "uploaded:2021-04-28",
> >     }
> >
> > rather than the nested version we had before.
> >
> > Original change's description:
> > > Reland "Bump Windows SDK to 10.0.19041.0"
> > >
> > > This is a reland of 020da53ac84de675c8adae5b512f4257adc9dfe3
> > >
> > > Original change's description:
> > > > Bump Windows SDK to 10.0.19041.0
> > > >
> > > > Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> > > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > > > Commit-Queue: Mark Mentovai <mark@chromium.org>
> > >
> > > Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
> > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
> > > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> >
> > Change-Id: Iafb40bd8799dbfea9308f19e3c6e7568bcba82df
> > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260757
> > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > Bug: crashpad:
>
> Bug: 1250098
> Change-Id: Ia3fa460e7054c85456bca37478b03c60906b36a9
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3286783
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Alex Gough <ajgo@chromium.org>

Bug: 1250098
Change-Id: If183131c20b15ec87a956fccee2dcbcf0c551091
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3290110
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-11-17 20:24:13 +00:00
Alex Gough
e5e47bc277 Reland "Reland "Reland "Bump Windows SDK to 10.0.19041.0"""
This is a reland of 3dc913b12b4853ef620495a74081dd15fca8dc5e

Previous attempt failed as the recipe helper in depot tools did not
understand the new cipd win sdk layout and failed at the
'SetEnv.target.json' step.
https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8831436994854248129/+/u/read_SetEnv.x86.json/stdout

This should be addressed once
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3283800
is rolled into the bot infrastructure.

> This is a reland of 44f566832da48b25c09ee83d4221a9c57f359a82
>
> The proper format for this sort of property is:
>
>     properties["$depot_tools/windows_sdk"] = {
>         "version": "uploaded:2021-04-28",
>     }
>
> rather than the nested version we had before.
>
> Original change's description:
> > Reland "Bump Windows SDK to 10.0.19041.0"
> >
> > This is a reland of 020da53ac84de675c8adae5b512f4257adc9dfe3
> >
> > Original change's description:
> > > Bump Windows SDK to 10.0.19041.0
> > >
> > > Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > > Commit-Queue: Mark Mentovai <mark@chromium.org>
> >
> > Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
> > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
> > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > Reviewed-by: Mark Mentovai <mark@chromium.org>
>
> Change-Id: Iafb40bd8799dbfea9308f19e3c6e7568bcba82df
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260757
> Commit-Queue: Alex Gough <ajgo@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Bug: crashpad:

Bug: 1250098
Change-Id: Ia3fa460e7054c85456bca37478b03c60906b36a9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3286783
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-11-17 04:22:34 +00:00
Peter Boström
ab9a87fb54 Fix dead-code warning in util/posix/signals.cc
This unblocks a roll of crashpad into chromium.

Bug: None
Change-Id: I54fc53e0b53b8a7c7ff8e28c4657b46587bfad8d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3287226
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-17 00:57:24 +00:00
Jakob Kummerow
08978c7b75 Linux: Add a test for "extra memory" / code-around-pc
And implement ExtraMemory() for ProcessSnapshotMinidump for this purpose.

Bug: crashpad:10,crashpad:30
Change-Id: I889c42c7e91358336671ae8d00154af820725e7b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3279301
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
2021-11-16 21:36:03 +00:00
Peter Boström
bede7bb29e Rename "base/macros.h" => "base/ignore_result.h"
This pulls in "base/ignore_result.h" from mini_chromium through DEPS and
updates existing uses of "base/macros.h" to use "base/ignore_result.h".

Bug: chromium:1010217
Change-Id: I283e2bcfb2775de420d7e767b3b4a639dbba9e20
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3286105
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
2021-11-16 21:21:28 +00:00
Peter Collingbourne
04431eccfe Reraise signals via rt_tgsigqueueinfo(2) on Linux.
Previously we would rely on implicit re-raising to deliver signals to
the underlying handler on POSIX systems if the signal is detected as
being re-raisable via WillSignalReraiseAutonomously(). This detection
mechanism is imperfect, as it will misclassify signals delivered as
a result of kill(2) when passing a signal number usually used for
synchronous signals, but now also asynchronous MTE tag check faults,
which are delivered as SIGSEGV signals on Linux. As a result, these
signals would not be re-raised and therefore would be discarded.

Although we could, for example, teach WillSignalReraiseAutonomously()
about MTE faults, the signal would still be re-raised via raise(3)
and therefore we would lose the information in siginfo.

We can avoid discarding these signals on Linux while at the
same time preserving the siginfo by making use of the syscall
rt_tgsigqueueinfo(2) which delivers a signal together with a
user-provided siginfo. The problem still exists on non-Linux POSIX
systems because this syscall is Linux-specific.

Change-Id: I6df58d9371e29f75e19b4f899b723d4047f12936
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3278691
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-16 02:45:23 +00:00
Olivier Robin
c8d8dd9ccf Add attachment support for Mac/iOS crash report database
Copy the crash_report_database_generic implementation.

bug: crashpad: 31
Change-Id: I582620ec8b22fecc7568d220c410c397948dfcb1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3045405
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-11-15 17:41:54 +00:00
Jakob Kummerow
d62cc6fdbd Linux: capture memory pointed to by context
This adds support for capturing memory snippets for addresses
currently stored in registers to Linux/Android/CrOS.
Modeled after the existing support on Windows.

Bug: crashpad:30
Change-Id: Ib7cb523555a6e8e4d70145c205d67dcfbc9c7fcc
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3273712
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-11-12 18:15:04 +00:00
Justin Cohen
afeb19f1d2 ios: Limit intermediate dump processing to 20 files.
Because the intermediate dump directory is expected to be shared,
mitigate any spamming by limiting this to 20. Prioritize our
bundle id intermediate dumps first.

Bug: crashpad: 31
Change-Id: I2888431b8bd2d94f481d2f4ec6e032882dad9698
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3261747
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-11 11:59:26 +00:00
Justin Cohen
6fd38ffedf ios: Add exception preprocessor sinkhole for CoreAutoLayout.
Another set of iOS redacted sinkholes appear in CoreAutoLayout.
However, this is often called by our code, so it's unsafe to simply
handle an uncaught nsexception here. Instead, skip the frame and
continue searching for either a handler that belongs to us, or another
sinkhole.

Bug: crashpad: 31
Change-Id: I20be2acef96f5ee6b7521144548e920e635f0dc7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3261270
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-11 03:54:23 +00:00
Robert Sesek
8342e6bd61 mac/ios: Restore NSInputStream-backed HTTP transport reader.
This effectively reverts f0ee5f0efee651ab82aa854761f107193b3db5de, but
updates the subclass with the new required NSStream methods. Crashpad
switched to using CFReadStream because NSInputStream required overriding
two private methods of NSInputStream in order to use it with
NSURLConnection. With Mac OS X 10.11 (the earliest that Chromium
supports), this is no longer the case. On iOS, using the private
CFReadStreamCreate() API is not permissible. Switch back to using a
custom NSInputStream subclass instead.

Bug: crashpad:382
Change-Id: I92b1260f49c6fa6c304475f7dc9b27ae1a5f35c4
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3271448
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-10 21:14:42 +00:00
Justin Cohen
d4bdb997a6 ios: Store Crashpad client annotations in the intermediate dump.
The iOS crashpad client was mistakenly setting the process annotations
(typically things like version and product name) when converting the
intermediate dump into a minidump.  This is incorrect, as those
annotations are determined at intermediate dump creation time.

Instead, correctly write those annotations during intermediate dump
creation. Passing extra annotations during intermediate dump to
minidump is still supported.

Bug: crashpad: 31
Change-Id: Ic5e29debdc123011d130f75a48345071575466d9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3266127
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-10 18:23:41 +00:00
Justin Cohen
4bf79bc2bf ios: Fix typo in checking thread_times values.
Change-Id: I4199b5b149d7792dcfb8a3b8de571026b1e98521
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3264806
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-11-06 02:17:24 +00:00
Alex Gough
5225da1232 Revert "Reland "Reland "Bump Windows SDK to 10.0.19041.0"""
This reverts commit 3dc913b12b4853ef620495a74081dd15fca8dc5e.

Reason for revert: while the SDK is now being fetched, the step
Read SetEnv.platform.json is now failing.

https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket/8831436994854248129/+/u/read_SetEnv.x86.json/stdout

Original change's description:
> Reland "Reland "Bump Windows SDK to 10.0.19041.0""
>
> This is a reland of 44f566832da48b25c09ee83d4221a9c57f359a82
>
> The proper format for this sort of property is:
>
>     properties["$depot_tools/windows_sdk"] = {
>         "version": "uploaded:2021-04-28",
>     }
>
> rather than the nested version we had before.
>
> Original change's description:
> > Reland "Bump Windows SDK to 10.0.19041.0"
> >
> > This is a reland of 020da53ac84de675c8adae5b512f4257adc9dfe3
> >
> > Original change's description:
> > > Bump Windows SDK to 10.0.19041.0
> > >
> > > Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> > > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> > > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > > Commit-Queue: Mark Mentovai <mark@chromium.org>
> >
> > Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
> > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
> > Commit-Queue: Alex Gough <ajgo@chromium.org>
> > Reviewed-by: Mark Mentovai <mark@chromium.org>
>
> Change-Id: Iafb40bd8799dbfea9308f19e3c6e7568bcba82df
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260757
> Commit-Queue: Alex Gough <ajgo@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>

Change-Id: If7d29c2d95491eb7df23b21383deef7a85f9192f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260758
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-11-05 03:28:55 +00:00
Alex Gough
3dc913b12b Reland "Reland "Bump Windows SDK to 10.0.19041.0""
This is a reland of 44f566832da48b25c09ee83d4221a9c57f359a82

The proper format for this sort of property is:

    properties["$depot_tools/windows_sdk"] = {
        "version": "uploaded:2021-04-28",
    }

rather than the nested version we had before.

Original change's description:
> Reland "Bump Windows SDK to 10.0.19041.0"
>
> This is a reland of 020da53ac84de675c8adae5b512f4257adc9dfe3
>
> Original change's description:
> > Bump Windows SDK to 10.0.19041.0
> >
> > Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > Commit-Queue: Mark Mentovai <mark@chromium.org>
>
> Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
> Commit-Queue: Alex Gough <ajgo@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>

Change-Id: Iafb40bd8799dbfea9308f19e3c6e7568bcba82df
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260757
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-05 02:55:24 +00:00
Justin Cohen
717b3c9e7b ios: Fix incorrect type in IOSIntermediateDumpReader::Parse.
size_t is written to intermediate dump properties, but the parser was
reading off_t.  off_t can go negative, which is a bad thing to pass
to a std::vector constructor.

Bug: crashpad:31
Change-Id: I52ebda0b29ece50d6d1cbc9064a70b2e221a4df1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3261749
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-05 00:53:03 +00:00
Alex Gough
197d037cfd Revert "Reland "Bump Windows SDK to 10.0.19041.0""
Infra failures continue:

https://ci.chromium.org/ui/p/crashpad/builders/try/crashpad_win_x64_rel/114/overview

This reverts commit 44f566832da48b25c09ee83d4221a9c57f359a82.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Bump Windows SDK to 10.0.19041.0"
>
> This is a reland of 020da53ac84de675c8adae5b512f4257adc9dfe3
>
> Original change's description:
> > Bump Windows SDK to 10.0.19041.0
> >
> > Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > Commit-Queue: Mark Mentovai <mark@chromium.org>
>
> Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
> Commit-Queue: Alex Gough <ajgo@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>

Change-Id: I4b0629bccdb7586146f1775d20bfdc7d66348d2c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260756
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2021-11-04 23:42:23 +00:00
Alex Gough
44f566832d Reland "Bump Windows SDK to 10.0.19041.0"
This is a reland of 020da53ac84de675c8adae5b512f4257adc9dfe3

Original change's description:
> Bump Windows SDK to 10.0.19041.0
>
> Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Mark Mentovai <mark@chromium.org>

Change-Id: I9e8d14415c12c28b6a230b689d3b791a086d7a06
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260604
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-04 23:15:23 +00:00
Mark Mentovai
b50484dbe0 infra: Enable bbagent and use_python3
Change-Id: Ibfe01bd8f327bae137bd948082dc09504d8a5cb8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3260456
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2021-11-04 21:21:18 +00:00
Justin Cohen
4bafdbc211 Revert "Bump Windows SDK to 10.0.19041.0"
This reverts commit 020da53ac84de675c8adae5b512f4257adc9dfe3.

Reason for revert: Speculative revert, as trybots are failing:
https://ci.chromium.org/ui/p/crashpad/builders/try/crashpad_win_x64_rel/103/overview

Original change's description:
> Bump Windows SDK to 10.0.19041.0
>
> Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Mark Mentovai <mark@chromium.org>

Change-Id: Ibd534e55fd81279e4d0f4df0f387fdaaa2475845
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3259422
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-11-04 20:38:10 +00:00
Alex Gough
020da53ac8 Bump Windows SDK to 10.0.19041.0
Change-Id: Id0c308a838a8b94ce7d24369ffd168a10730a30a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3256822
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2021-11-03 03:16:42 +00:00
Peter Kasting
defcda0c2c Fix an instance of -Wshadow.
Bug: chromium:794619
Change-Id: I504c2931e19f7de4f9d65227fc55978622d0de6f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3253960
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2021-10-30 23:18:20 +00:00
Justin Cohen
d842c3c4c6 ios: Life of a crash report documentation.
Bug: crashpad: 31
Change-Id: Ic67aa0450cc273bd4088c494ed2656365b700198
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3234451
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
2021-10-28 21:50:19 +00:00
Justin Cohen
fad3bdcde0 ios: Update XCUITests to check various crash type exception codes.
Bug: crashpad:31
Change-Id: I804def3be0050b3e6f15d7d77d0b70184c380673
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3087722
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-10-28 21:37:59 +00:00
Justin Cohen
15c4663b8c ios: Fail Crashpad initialization with invalid database path.
Bug: crashpad:31
Change-Id: I1853af83a18675bee6dd99636f179db127e1ac47
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3247291
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-10-28 21:25:50 +00:00
Justin Cohen
9c6a751e4b ios: Record NSException.userInfo value.
Add another annotation similar to name and reason for the NSException
userInfo string value.

Bug: crashpad:31
Change-Id: Ifeda599d7855c1061e5c0f1fb5fe45d568af65f7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3238128
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-10-28 19:56:10 +00:00
Joshua Peraza
c647c0cb12 Use Python3 on all builders
Bug: chromium:1256408
Change-Id: Id4af99414cc8c3cb9c43499bbd2508c0c233f559
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3247779
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2021-10-27 15:50:57 +00:00
Justin Cohen
9747e05e7a ios: Move ios_xcuitest_test to ios_test_runner_xcuitest
This template will allow these tests to run on the Chromium bots.

Change-Id: I3d9ee46379eed104fb847a9a8c1d72462cd67af8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3245731
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-10-26 16:52:35 +00:00
Justin Cohen
aaed581a53 Correct WorkDelegate::DoWork race condition with an atomic_bool.
Bug:crashpad:380
Change-Id: Iae523f22366ca65816c42b499bd482056efb5bca
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3244729
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-10-26 16:15:55 +00:00
Justin Cohen
0118cc44aa Roll mini_chromium to 461b416.
461b416: ios: Add ios_test_runner_xcuitest.

Change-Id: Ibc070d38aeb2f6396c1f51e9f2b6aa0212ae1ded
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3245733
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-10-26 16:10:07 +00:00
Justin Cohen
2d5a30fb17 ios: Create a PruneIntermediateDumpsAndCrashReportsThread.
This will prune the database on a daily basis, in accordance with the
specified condition. This will also unlock any leftover intermediate
dump files.

Bug: crashpad:31
Change-Id: I229f8b8006b44d31062fbf73bb9d316d69ab2dcf
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3231618
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-10-25 15:54:05 +00:00
Peter Kasting
2c45d05875 More -Wshadow fixes.
Bug: chromium:794619
Change-Id: I1987eb543d0b1a5f82eeb8504b6adde8ef6df600
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3238894
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-10-25 14:42:24 +00:00
Peter Kasting
164b41de76 Fix an instance of -Wshadow.
Bug: chromium:794619
Change-Id: I4561b1019d9aeee6c25d1d4083b977d0a05abdfc
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3236044
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2021-10-21 16:52:57 +00:00
Justin Cohen
31d9206f05 Correct new mini_chromium locations for external.
Followup to crrev.com/c/3062424 to fix Keystone build.

Change-Id: I0c6a7bb236a84e2e11f4a9292f8a95bc99a99277
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3231491
Commit-Queue: David Fang <fangism@google.com>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-10-19 20:51:44 +00:00
Justin Cohen
c367128a85 ios: Don't use POSIX file locks for iOS intermediate dumps.
Instead use a custom mechanism based on the filename. Rather than a
filename of <uuid>, instead name the file <bundle-id>|<uuid>[.locked].
A locked file will have the optional .locked extension. Files can be
unlocked after writing an intermediate dump, or during initialization by
looking for matching bundle-ids.

Clients that call ProcessIntermediateDumps() will clean up any leftover
locked intermediate dumps. Clients that never call
ProcessIntermediateDumps, such as extensions that leave this up to the
main application, will be cleaned up in a followup change.

Bug: crashpad:31
Change-Id: Icd4aaa3b79351870fbe9b8463cfbdf7cff7d5f87
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3229429
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
2021-10-19 18:23:51 +00:00
Amanda Tait
ec7a457e86 [fuchsia] Inject components from test pkg
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>
2021-10-15 16:27:47 +00:00
Justin Cohen
1ba15daa73 ios: Fix incorrect header include.
Change-Id: I0c24eae67684f95297478420e60e362836ef8874
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3224139
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-10-15 00:48:36 +00:00
Justin Cohen
02d50376a7 Correct formatting in util/posix/signals_test.cc
Change-Id: I431f663a91bfce62b8d554ee980fa62da8551275
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3223541
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-10-14 16:04:58 +00:00
Justin Cohen
204abe16d2 ios: Add iOS in-process handler for managing minidump generation.
Manage the intermediate minidump generation, and own the crash report
upload thread and database.

Change-Id: I272d790a827cd13f6872e56f4675f366d13719c5
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3087721
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-10-14 15:16:02 +00:00
Adenilson Cavalcanti
07a6b70755 Disable cause-SIGFPE test on Arm processors
The way that division operations behave have changed between Armv7
and Armv8. On the later one, divisions by zero will *not* yield an
exception of any kind (for both a 32bit and 64bit app), for hardware
integer divide operation.

On Arm processors exceptions may also be a factor of:
 - if the hardware implementation supports it.
 - if the kernel has set the proper internal state registers/flags.
 - C library implementations (e.g. libgcc x clang_rt).

Aside that, a division by zero is within the realm of UD (Undefined
Behavior) in C/C++.

Since there are two categories of tests (explicit raise x caused by
instructions), it just makes sense to disable the second for Arm
since there is no reliable way to cause a SIGFPE without an explicit
raise() POSIX call.

For x86, we keep the previous implementation idea but streamlined
the code by deploying 'volatile' to ensure that the compiler
won't optimize away the result of the division (i.e no need
to call stat() and fstat()).

Bug: chromium:919548, chromium:1184398
Change-Id: Ib0fd4bdf503dcd50149dccae0577c777488c0238
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3213431
Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-10-13 22:43:04 +00:00
Joshua Peraza
0a8985cd20 linux,arm: support memory tagging
64-bit ARM's Top-Byte-Ignore enables features such as memory tagging.
https://www.kernel.org/doc/html/latest/arm64/tagged-address-abi.html

Android 11 will start using memory tagging on some devices.
https://source.android.com/devices/tech/debug/tagged-pointers

Crashpad needs to remove the tags from pointers before comparing to
addresses or using with system calls.

Bug: crashpad:364
Change-Id: I67c6b9a4a86d090e1d139de727eb06d9e222cc25
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3078500
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2021-10-13 21:23:34 +00:00
Peter Kasting
dd53970380 Fix an instance of -Wunused-but-set-variable.
Bug: chromium:1203071
Change-Id: I055432e2652ce6ca8a57a6f0f4f584c3e9c511bc
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3217911
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2021-10-11 19:38:29 +00:00
Justin Cohen
413dedd90f ios: Missing include.
uint16_t needs stdint.h.

Change-Id: Iafbbb6365d2cf180e61f62c5fbd9e7c35a58e827
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3212887
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-10-07 20:39:39 +00:00
Peter Kasting
e29981e10c Fix an instance of -Wunused-but-set-variable.
Bug: chromium:794619
Change-Id: I4db52a6d895535b79e75331c51017489f490b4c1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3206094
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2021-10-05 18:34:13 +00:00
Justin Cohen
718d5d52ea win: Swap win_console and win_windowed for external handler.
Bug: crashpad:377
Change-Id: I1c4d16d6012701e02d54f2468f4048d2d7a19842
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3201106
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-10-05 16:06:01 +00:00