[compiler-rt] r357741 - [TSan][libdispatch] Make test work on Linux, pt. 2
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 4 19:05:57 PDT 2019
Author: yln
Date: Thu Apr 4 19:05:57 2019
New Revision: 357741
URL: http://llvm.org/viewvc/llvm-project?rev=357741&view=rev
Log:
[TSan][libdispatch] Make test work on Linux, pt. 2
Modified:
compiler-rt/trunk/test/tsan/libdispatch/dispatch_once_deadlock.c
Modified: compiler-rt/trunk/test/tsan/libdispatch/dispatch_once_deadlock.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/dispatch_once_deadlock.c?rev=357741&r1=357740&r2=357741&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/dispatch_once_deadlock.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/dispatch_once_deadlock.c Thu Apr 4 19:05:57 2019
@@ -28,8 +28,8 @@ int main() {
f();
- pthread_mutex_t mutex = {0};
- pthread_mutex_lock(&mutex);
+ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_mutex_unlock(&mutex); // Unlock of an unlocked mutex
fprintf(stderr, "g = %ld.\n", g);
fprintf(stderr, "h = %ld.\n", h);
More information about the llvm-commits
mailing list