Skip to content

Commit 167349a

Browse files
committed
Test failure: fix initialization of pthread_cond_t
1 parent 64df9c5 commit 167349a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler-rt/lib/radsan/tests/radsan_test_interceptors.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,16 @@ TEST(TestRadsanInterceptors, PthreadCondSignalDiesWhenRealtime) {
350350
}
351351

352352
TEST(TestRadsanInterceptors, PthreadCondBroadcastDiesWhenRealtime) {
353+
pthread_cond_t cond;
354+
pthread_cond_init(&cond, NULL);
353355
auto Func = []() {
354356
pthread_cond_t cond;
355357
pthread_cond_broadcast(&cond);
356358
};
357359
ExpectRealtimeDeath(Func, "pthread_cond_broadcast");
358360
ExpectNonRealtimeSurvival(Func);
361+
362+
pthread_cond_destroy(&cond);
359363
}
360364

361365
TEST(TestRadsanInterceptors, PthreadCondWaitDiesWhenRealtime) {

0 commit comments

Comments
 (0)