diff --git a/compiler-rt/lib/gwp_asan/tests/backtrace.cpp b/compiler-rt/lib/gwp_asan/tests/backtrace.cpp --- a/compiler-rt/lib/gwp_asan/tests/backtrace.cpp +++ b/compiler-rt/lib/gwp_asan/tests/backtrace.cpp @@ -21,7 +21,7 @@ DeathRegex.append("was deallocated.*DeallocateMemory[^2].*"); DeathRegex.append("was allocated.*AllocateMemory"); if (!Recoverable) { - ASSERT_DEATH(DeallocateMemory2(GPA, Ptr), DeathRegex); + EXPECT_DEATH(DeallocateMemory2(GPA, Ptr), DeathRegex); return; } @@ -51,7 +51,7 @@ DeathRegex.append("was allocated.*AllocateMemory"); if (!Recoverable) { - ASSERT_DEATH(TouchMemory(Ptr), DeathRegex); + EXPECT_DEATH(TouchMemory(Ptr), DeathRegex); return; } diff --git a/compiler-rt/lib/gwp_asan/tests/harness.cpp b/compiler-rt/lib/gwp_asan/tests/harness.cpp --- a/compiler-rt/lib/gwp_asan/tests/harness.cpp +++ b/compiler-rt/lib/gwp_asan/tests/harness.cpp @@ -47,8 +47,16 @@ << OutputBuffer; } +// Only test non-recoverable code paths on the Fuchsia platform because Fuchsia +// does not support signal handlers used by recoverable tests. +#if defined(__Fuchsia__) +INSTANTIATE_TEST_SUITE_P(RecoverableAndNonRecoverableTests, + BacktraceGuardedPoolAllocatorDeathTest, + /* Recoverable */ testing::Values(false)); +#else INSTANTIATE_TEST_SUITE_P(RecoverableTests, BacktraceGuardedPoolAllocator, /* Recoverable */ testing::Values(true)); INSTANTIATE_TEST_SUITE_P(RecoverableAndNonRecoverableTests, BacktraceGuardedPoolAllocatorDeathTest, /* Recoverable */ testing::Bool()); +#endif