[compiler-rt] r263778 - [TSAN] Relax the expected output of race_on_mutex.c
Sagar Thakur via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 22:41:20 PDT 2016
Author: slthakur
Date: Fri Mar 18 00:41:20 2016
New Revision: 263778
URL: http://llvm.org/viewvc/llvm-project?rev=263778&view=rev
Log:
[TSAN] Relax the expected output of race_on_mutex.c
The stack trace produced by TSan on MIPS is:
Previous write of size 8 at 0x0120ed2930 by thread T1:
#0 memset
/home/slt/LLVM/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:678
(race_on_mutex.c.tmp+0x0120071808)
#1 __GI___pthread_mutex_init
/build/glibc-g99ldr/glibc-2.19/nptl/pthread_mutex_init.c:84
(libpthread.so.0+0x000000d634)
#2 <null>
/home/slt/LLVM/llvm/projects/compiler-rt/test/tsan/race_on_mutex.c:11 (race_on_mutex.c.tmp+0x01200ea59c)
Reviewers: samsonov, dvyukov
Subscribers: llvm-commits, mohit.bhakkad, jaydeep
Differential: http://reviews.llvm.org/D17796
Modified:
compiler-rt/trunk/test/tsan/race_on_mutex.c
Modified: compiler-rt/trunk/test/tsan/race_on_mutex.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_on_mutex.c?rev=263778&r1=263777&r2=263778&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_on_mutex.c (original)
+++ compiler-rt/trunk/test/tsan/race_on_mutex.c Fri Mar 18 00:41:20 2016
@@ -2,10 +2,6 @@
// This test fails when run on powerpc64 (VMA=46).
// The size of the write reported by Tsan for T1 is 8 instead of 1.
// XFAIL: powerpc64
-// This test expects pthread_mutex_init in the frame #0 of thread T1 but we
-// get memset at frame #0 because memset that is called from pthread_init_mutex
-// is being intercepted by TSan
-// XFAIL: mips64
#include "test.h"
pthread_mutex_t Mtx;
@@ -24,9 +20,9 @@ void *Thread2(void *x) {
}
void *Thread1(void *x) {
-// CHECK: Previous write of size 1 at {{.*}} by thread T1:
-// CHECK-NEXT: #0 pthread_mutex_init {{.*}} ({{.*}})
-// CHECK-NEXT: #1 Thread1{{.*}} {{.*}}race_on_mutex.c:[[@LINE+1]]{{(:3)?}} ({{.*}})
+// CHECK: Previous write of size {{[0-9]+}} at {{.*}} by thread T1:
+// CHECK: #{{[0-9]+}} {{.*}}pthread_mutex_init {{.*}} ({{.*}})
+// CHECK-NEXT: #{{[0-9]+}} Thread1{{.*}} {{.*}}race_on_mutex.c:[[@LINE+1]]{{(:3)?}} ({{.*}})
pthread_mutex_init(&Mtx, 0);
pthread_mutex_lock(&Mtx);
Global = 42;
More information about the llvm-commits
mailing list