Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc

Issue 2478633002: Update Crashpad to b47bf6c250c6b825dee1c5fbad9152c2c962e828 (Closed)
Patch Set: mac comment 2 Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
diff --git a/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc b/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
index 5d5908d93e833e909995cd4d0e91badf5f1b6b6f..d25ba4387c0ed110a3be38d1b40ec43276987d02 100644
--- a/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
+++ b/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
@@ -117,7 +117,18 @@ class TestMachOImageAnnotationsReader final
bool* destroy_complex_request) override {
*destroy_complex_request = true;
- EXPECT_EQ(ChildTask(), task);
+ // In 10.12, dyld fatal errors as tested by test_type_ = kCrashDyld are via
+ // abort_with_payload(). In 10.12.1, the task port delivered in an exception
+ // message for this termination type is a corpse, even when the exception is
+ // EXC_CRASH and not EXC_CORPSE_NOTIFY. The corpse task port (here, |task|)
+ // is distinct from the process’ original task port (ChildTask()). This is
+ // filed as https://openradar.appspot.com/29079442.
+ //
+ // Instead of comparing task ports, compare PIDs.
+ pid_t task_pid;
+ kern_return_t kr = pid_for_task(task, &task_pid);
+ EXPECT_EQ(KERN_SUCCESS, kr) << MachErrorMessage(kr, "pid_for_task");
+ EXPECT_EQ(ChildPID(), task_pid);
ProcessReader process_reader;
bool rv = process_reader.Initialize(task);

Powered by Google App Engine
This is Rietveld 408576698