Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: update 2023-02-07 #80

Merged
merged 24 commits into from
Feb 7, 2023
Merged

Conversation

supervacuus
Copy link
Collaborator

No description provided.

nmulcahey and others added 24 commits December 12, 2022 21:21
These third_party dependencies need to move to the `.../src` folder for Fuchsia.

Bug: b/258565335
Change-Id: I36a87cf0cca6461fa09fffc7a8c642e1b24edbaa
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4097194
Commit-Queue: Nathan Mulcahey <nmulcahey@google.com>
Reviewed-by: Francois Rousseau <frousseau@google.com>
Bug: b/258565335
Change-Id: I49f05fb9a8eaf1b0c3d9c8c302ceb3c5340799c9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4099724
Commit-Queue: Nathan Mulcahey <nmulcahey@google.com>
Reviewed-by: Francois Rousseau <frousseau@google.com>
To support a new crashpad::RingBufferAnnotation type which can be safely
written to and read from simultaneously by different threads/processes,
this CL introduces a new class ScopedSpinGuard, which is a simple RAII
wrapper around an atomic boolean.

Change-Id: I5bafe6927a8dc2a3e25734cb941fd9fce9a8d139
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4031729
Commit-Queue: Ben Hamilton <benhamilton@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This CL implements LengthDelimitedRingBuffer, a general-purpose
ringbuffer suitable for use as a Crashpad Annotation.

This ringbuffer supports writing variably-sized data delimited by a Base
128 varint-encoded length separator.

LengthDelimitedRingBuffer is backed by a std::array, so it has a fixed
maximum size. It supports reading via RingBufferReader as well as
writing via RingBufferWriter.

Change-Id: I23ecb4a85ee8e846e1efc6937a5cb089a494d50a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4023618
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Ben Hamilton <benhamilton@google.com>
GN now does more iOS xcode project generation natively.

Change-Id: I0a133e648a9426cfc822e40af36c2626ddb58f68
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4111089
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Change-Id: I5511911110b58b7accd0f78cc1094924bfbda71e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4114702
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Ben Hamilton <benhamilton@google.com>
Change-Id: I477919feec68d317ca3cb8a0d07022e9405156dd
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4118347
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Ben Hamilton <benhamilton@google.com>
... as we move crashpad from //third_party/crashpad to
//third_party/crashpad/src

Change-Id: I081520ad44334cc83397234e5d16535d0db4806d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4132465
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Jay Zhuang <jayzhuang@google.com>
The try and catch macros were conditionally defined by libstdc++ pre-gcc
4.4 (2009-04-21), fixed in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191. Surely none of this
code would build with such an old libstdc++ any more, since Crashpas has
adopted modern C++ (C++11 and later). Remove this obsolete nod to
history.

Change-Id: Ie3cea1ecc1cfd358f27ea48f8111791e7f08bfa5
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4136890
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
... when compile target is Fuchsia

Change-Id: Id77babbd3dffff26c75a52296ac91101780e4c33
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4132464
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Jay Zhuang <jayzhuang@google.com>
... when build is targeting Fuchsia

Change-Id: I03fab9368bd5e8687899a2efeb51736707bce81e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4137733
Commit-Queue: Jay Zhuang <jayzhuang@google.com>
Reviewed-by: Francois Rousseau <frousseau@google.com>
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: chromium:1364441
Change-Id: I23aaa16644c10ac5b607ea29d25799fbb08dfaca
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4163072
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Much of crashpad's unittests propagate tagged pointers to fuchsia
syscalls which do not accept tagged values. Rather than fixing them all
right now, just ensure that the tests do not build with the hwasan
variant if enabled.

Bug: fxbug.dev/108368
Change-Id: Ib32eb95ba671a6b55694075b68c7fbbb733cf501
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4175438
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
Bug: chromium:1373664
Change-Id: I948eac3a46e8ad0d6fe70413111641e77c7ae57c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4196074
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
It looks like macOS 13 only *sometimes* puts __crash_info in
__DATA_DIRTY. Instead of splitting by version check, let's just look
in __DATA_DIRTY if we can't find it in __DATA.

Bug: chromium:1372165
Change-Id: I99d2e759c66841d982039449e83f8658259d7ed1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4197706
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
ARM64 supports storing pointer authentication codes in the upper bits of
a pointer. This mask can be used by LLDB to mimic ptrauth_strip and
strip the pointer authentication codes. To recover an address from
pointer with an authentication code, `AND` this mask with the pointer.

If the platform does not support pointer authentication, or the range of
valid addressees for a pointer was unaccessible, this field will be 0
and should be ignored.

Change-Id: Ie5cef90802dd1e892d456195ab8874223eac6a1b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2773358
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This CL cleans up types and code style comments from post-submit code
review comments on https://crrev.com/c/4023618 .

I also added fixes for potential overflows in varint length decoding
and included new tests.

Bug: crashpad:437
Change-Id: I0a3585036028d81f42d0d36e87cce4264f4ed9ad
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4199705
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This CL introduces a new class ScopedVMMap, a fork of ScopedVMRead
which maps the memory using vm_remap() instead of reading it.

This is useful for Annotations which use ScopedSpinGuard to
protect reads from simultaneous writes; the in-process intermediate
dump handler can try to take the spin guard when reading such
an Annotation and skip reading it if it the spin guard could not
be obtained.

Change-Id: I60d7a48d1ba4e5d2dfdb44307b78b4d9ffb73560
Bug: crashpad:437
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4114550
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Ben Hamilton <benhamilton@google.com>
from documentation of `ProcessException` in `crashpad_wer.h`:

```
//! \param[in] handled_exceptions is an array of exception codes that the helper
//!     should pass on to crashpad handler (if possible). Pass nullptr and set
//!     num_handled_exceptions to 0 to pass every exception on to the crashpad
//!     handler.
```

fix the check to handle `num_handled_exceptions == 0` case to not filter
out any exceptions.

Bug: crashpad:439
Change-Id: Ic4559a730a26e37c7a8f13e6bcae7595d743924a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4206503
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
This CL optionally integrates ScopedSpinGuard (an atomic boolean) with
crashpad::Annotation.

Subclasses of Annotation can choose to integrate ScopedSpinGuard into
their Set(...) methods to ensure reads and writes are serialized.

I didn't integrate this into StringAnnotation in this CL, but it'd be
pretty trivial to do in a follow-up.

Change-Id: I1c5b8982576b03f9780a57acb7627c9194f8f0ff
Bug: crashpad:437
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4022484
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Ben Hamilton <benhamilton@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This CL integrates the new ScopedSpinGuard with the new
LengthDelimitedRingBuffer into a new class, RingBufferAnnotation.

RingBufferAnnotation is thread-safe both for reading and writing, and is
suitable for streaming logs, trace events, and other high-throughput
data streams.

I included a load test (ring_buffer_annotation_load_test) which launches
two threads which simultaneously write to and read from the
RingBufferAnnotation.

By default, reads and writes are serialized using ScopedSpinGuard, but
passing the flag "--disable_spin_guard" to the test disables the spin
guard on the reading side (which is expected to make the test fail).

Change-Id: Ic8e28866d085d57e778c4f86bcb7492ef0638ab9
Bug: crashpad:437
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4023619
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Ben Hamilton <benhamilton@google.com>
Since iOS reads Annotations in-process, this CL updates the iOS
intermediate dump handler to check each Annotation to see if it supports
guarding concurrent reads and writes using ScopedSpinGuard.

For any such Annotation, the in-process dump handler now tries (without
spinning) to obtain the ScopedSpinGuard for the Annotation before
reading its memory.

If the ScopedSpinGuard cannot immediately be obtained, the in-process
dump handler just skips writing the memory of the Annotation to the
intermediate dump. (I'd like to follow up and thread down a Params
object so we can experiment with adding an optional timeout to make
this more reliable.)

Change-Id: Ie6c9849fac94ab89b36364b07aea62326cabe552
Bug: crashpad:437
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4031730
Commit-Queue: Ben Hamilton <benhamilton@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
@supervacuus supervacuus merged commit ec99257 into getsentry:getsentry Feb 7, 2023
@supervacuus supervacuus deleted the meta/update branch February 7, 2023 09:29
supervacuus added a commit to getsentry/sentry-native that referenced this pull request Feb 7, 2023
- Switch Crashpad transport on Linux to use libcurl ([#803](#803), [crashpad#75](getsentry/crashpad#75), [crashpad#79](getsentry/crashpad#79))
- Avoid accidentally mutating CONTEXT when client-side stack walking in Crashpad ([#803](#803), [crashpad#77](getsentry/crashpad#77))
- Fix various mingw compilation issues ([#794](#794), [crashpad#78](getsentry/crashpad#78))
- Updated Crashpad backend to 2023-02-07. ([#803](#803), [crashpad#80](getsentry/crashpad#80))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants