| Index: util/mach/exception_ports_test.cc
|
| diff --git a/util/mach/exception_ports_test.cc b/util/mach/exception_ports_test.cc
|
| index d549651c53d4474bc40adabb7059c4148a59f5dd..7da1d56de23f36c7e0abc3cc4a807cc752dcfa1e 100644
|
| --- a/util/mach/exception_ports_test.cc
|
| +++ b/util/mach/exception_ports_test.cc
|
| @@ -183,21 +183,19 @@ class TestExceptionPorts : public UniversalMachExcServer,
|
| EXPECT_EQ(EXC_CRASH, exception);
|
| EXPECT_EQ(2u, code_count);
|
|
|
| - // The code_count check above would ideally use ASSERT_EQ so that the next
|
| - // conditional would not be necessary, but ASSERT_* requires a function
|
| - // returning type void, and the interface dictates otherwise here.
|
| - if (code_count >= 1) {
|
| - // The signal that terminated the process is stored in code[0] along with
|
| - // some other data. See 10.9.4 xnu-2422.110.17/bsd/kern/kern_exit.c
|
| - // proc_prepareexit().
|
| - int sig = (code[0] >> 24) & 0xff;
|
| + // The exception and code_count checks above would ideally use ASSERT_EQ so
|
| + // that the next conditional would not be necessary, but ASSERT_* requires a
|
| + // function returning type void, and the interface dictates otherwise here.
|
| + if (exception == EXC_CRASH && code_count >= 1) {
|
| + int signal;
|
| + ExcCrashRecoverOriginalException(code[0], NULL, &signal);
|
|
|
| // The child crashed with a division by zero, which shows up as SIGFPE.
|
| // This was chosen because it’s unlikely to be generated by testing or
|
| // assertion failures.
|
| - EXPECT_EQ(SIGFPE, sig);
|
| + EXPECT_EQ(SIGFPE, signal);
|
|
|
| - SetExpectedChildTermination(kTerminationSignal, sig);
|
| + SetExpectedChildTermination(kTerminationSignal, signal);
|
| }
|
|
|
| // Even for an EXC_CRASH handler, returning KERN_SUCCESS with a
|
|
|