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