diff options
-rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp index c903846e1a8..be577c33640 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp @@ -54,7 +54,12 @@ TEST(SanitizerCommon, PthreadDestructorIterations) { SpawnThread(GetPthreadDestructorIterations()); EXPECT_TRUE(destructor_executed); SpawnThread(GetPthreadDestructorIterations() + 1); +#if SANITIZER_SOLARIS + // Solaris continues calling destructors beyond PTHREAD_DESTRUCTOR_ITERATIONS. + EXPECT_TRUE(destructor_executed); +#else EXPECT_FALSE(destructor_executed); +#endif ASSERT_EQ(0, pthread_key_delete(key)); } |