mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:16:13 +00:00
mac: dyld fatal errors appear as abort() on 10.12
In 10.12, dyld calls abort_with_payload() on fatal error from dyld::halt(). In previous 10.12 betas, abort_with_payload() caused the process to appear to terminate as exit(1). This was weird, so I filed https://openradar.appspot.com/26894758. In 10.12db4 16A270f, Apple seems to have fixed this bug. abort_with_payload() as used by dyld now causes the process to appear to terminate as abort() as I had requested. A Crashpad test that assures Crashpad’s ability to catch dyld crashes needs its expectations updated with each change to a process’ apparent termination code. It’s updated to expect SIGABRT on 10.12 or later. No concessions are made for previous 10.12 betas or their buggy exit(1) behavior. Nobody should be running any 10.12 beta prior to 10.12db4 16A270f now or at any point in the future. This undoes (redoes) 335ef494677f. BUG=crashpad:120 TEST=crashpad_snapshot_test MachOImageAnnotationsReader.CrashDyld Change-Id: I13b330ac83fc9b33907ac172d35983974b8910f0 Reviewed-on: https://chromium-review.googlesource.com/365920 Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
parent
7b8de8a404
commit
7c807242e0
@ -286,18 +286,15 @@ class TestMachOImageAnnotationsReader final
|
||||
break;
|
||||
|
||||
case kCrashDyld:
|
||||
if (MacOSXMinorVersion() < 12) {
|
||||
// dyld fatal errors result in the execution of an int3 instruction
|
||||
// on x86 and a trap instruction on ARM, both of which raise
|
||||
// SIGTRAP. 10.9.5 dyld-239.4/src/dyldStartup.s _dyld_fatal_error.
|
||||
SetExpectedChildTermination(kTerminationSignal, SIGTRAP);
|
||||
} else {
|
||||
// This changed in 10.12 to normal termination with an exit code of
|
||||
// 1. It’s weird for an abnormal dyld abort to be indistinguishable
|
||||
// from a normal process failure, so
|
||||
// http://openradar.appspot.com/26894758 is on file.
|
||||
SetExpectedChildTermination(kTerminationNormal, EXIT_FAILURE);
|
||||
}
|
||||
// Prior to 10.12, dyld fatal errors result in the execution of an
|
||||
// int3 instruction on x86 and a trap instruction on ARM, both of
|
||||
// which raise SIGTRAP. 10.9.5 dyld-239.4/src/dyldStartup.s
|
||||
// _dyld_fatal_error. This changed in 10.12 to use
|
||||
// abort_with_payload(), which appears as SIGABRT to a waiting
|
||||
// parent.
|
||||
SetExpectedChildTermination(
|
||||
kTerminationSignal,
|
||||
MacOSXMinorVersion() < 12 ? SIGTRAP : SIGABRT);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user