-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[rtsan] Ensure pthread is initialized in test #111401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Handle running stuck of `pthread_cond_destroy` on X86 in test `PthreadCondSignalDiesWhenRealtime` and `PthreadCondBroadcastDiesWhenRealtime`.
@llvm/pr-subscribers-compiler-rt-sanitizer Author: None (lizhijin1024) ChangesHandle running stuck of Full diff: https://github.com/llvm/llvm-project/pull/111401.diff 1 Files Affected:
diff --git a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp
index c65b1bb01fbe01..f7a281f13e2ff6 100644
--- a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp
+++ b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp
@@ -539,7 +539,7 @@ TEST(TestRtsanInterceptors, SpinLockLockDiesWhenRealtime) {
TEST(TestRtsanInterceptors, PthreadCondSignalDiesWhenRealtime) {
pthread_cond_t cond{};
- pthread_cond_init(&cond, NULL);
+ ASSERT_EQ(0, pthread_cond_init(&cond, nullptr));
auto Func = [&cond]() { pthread_cond_signal(&cond); };
ExpectRealtimeDeath(Func, "pthread_cond_signal");
@@ -550,7 +550,7 @@ TEST(TestRtsanInterceptors, PthreadCondSignalDiesWhenRealtime) {
TEST(TestRtsanInterceptors, PthreadCondBroadcastDiesWhenRealtime) {
pthread_cond_t cond{};
- pthread_cond_init(&cond, NULL);
+ ASSERT_EQ(0, pthread_cond_init(&cond, nullptr));
auto Func = [&cond]() { pthread_cond_broadcast(&cond); };
ExpectRealtimeDeath(Func, "pthread_cond_broadcast");
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/7791 Here is the relevant piece of the build log for the reference
|
Handle running stuck of
pthread_cond_destroy
on X86 in testPthreadCondSignalDiesWhenRealtime
andPthreadCondBroadcastDiesWhenRealtime
.