[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 llvm-svn: 263778
This commit is contained in:
parent
64d075ec07
commit
b2ef71e591
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue