5 Commits

Author SHA1 Message Date
Avi Drissman
4ae896bad0 Migrate to OS_MAC and OS_APPLE in Crashpad
This migrates:

 defined(OS_MACOSX) -> defined(OS_APPLE)
 defined(OS_MACOSX) && !defined(OS_IOS) -> defined(OS_MAC)
 !defined(OS_MACOSX) || defined(OS_IOS) -> !defined(OS_MAC)

Bug: chromium:1105907
Change-Id: I1b4abc19bbbe8df90e9c6e64cd29324b40b8ab71
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2321777
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-07-28 02:35:48 +00:00
Scott Graham
0403602393 Fix CrashpadInfoSizes_ClientOptions/CrashpadInfoSizes_ClientOptions
These tests needed to be updated to expose CrashpadInfo in the same way
as the main CrashpadInfo g_crashpad_info is found on
Linux/Android/Fuchsia.

Unfortunately, while the tests pass on Fuchsia when run in isolation,
the implementation of dlclose() on Fuchsia currently does nothing. So,
if the full test suite is run, there's interference between the test
modules (i.e. the values in _small vs. the values in _large), so the
tests fail.

I filed ZX-1728 upstream about this to see if it might be implemented,
or if the test will need to spawn a clean child to do the module load
tests in.

Bug: crashpad:196
Change-Id: I9ee01b142a29c508c6967dc83da824afa254d379
Reviewed-on: https://chromium-review.googlesource.com/923182
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-02-16 18:48:58 +00:00
Scott Graham
3a07faf171 fuchsia: Fully initialize TestCrashpadInfo structure
The in-Fuchsia build fails with:

../../third_party/crashpad/snapshot/crashpad_info_size_test_module.cc:89:77: error: missing field 'indirectly_referenced_memory_cap_' initializer [-Werror,-Wmissing-field-initializers]
TestCrashpadInfo g_test_crashpad_info = {'CPad', sizeof(TestCrashpadInfo), 1};

kulakowski mentioned in the context of the = {0} CL recently that
they've turned on some somewhat unusual warnings because they have a
higher-than-usual amount of C code, as well as code that has to build as
both C and C++. I think that's where this one comes from.

Bug: crashpad:196
Change-Id: Ie1b373a32f99615366c7fcd65cd4ae4761385ff9
Reviewed-on: https://chromium-review.googlesource.com/862802
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-12 00:58:11 +00:00
Scott Graham
6719610b8c fuchsia: Get crashpad_snapshot_test building
ProcessSnapshotFuchsia is just a stub, so running fails immediately.

Bug: crashpad:196
Change-Id: Ie281cc13c4ff4a6e9699e882dbd6207daaab346d
Reviewed-on: https://chromium-review.googlesource.com/809234
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-12-06 17:31:57 +00:00
Mark Mentovai
d7798a4e28 Tolerate safe size mismatches in the CrashpadInfo struct
The handler will now be less strict about checking CrashpadInfo struct
sizes. Assuming the signature and version fields match:

 - If the handler sees a struct smaller than it’s expecting, the module
   was likely built with an earlier version of the client library, and
   it’s safe to treat the unknown fields as though they were zero or
   other suitable default values.
 - If the handler sees a struct larger than it’s expecting, the module
   was likely built with a later version of the client library. In that
   case, actions desired by the client will not be performed, but this
   is not otherwise an error condition.

The CrashpadInfo struct must always be at least large enough to contain
at least the size field. The signature and version fields are always
checked.

The section size must be at least as large as the size carried within
the struct. To account for possible section padding, strict equality is
not required.

Bug: chromium:784427
Test: crashpad_snapshot_test CrashpadInfoSizes_ClientOptions/*.*
Change-Id: Ibb0690ca6ed5e7619d1278a68ba7e893d55f19fb
Reviewed-on: https://chromium-review.googlesource.com/767709
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2017-11-15 18:09:23 +00:00