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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>