[compiler-rt] r192798 - tsan: revert variable name change in test

Dmitry Vyukov dvyukov at google.com
Wed Oct 16 08:57:23 PDT 2013


Author: dvyukov
Date: Wed Oct 16 10:57:23 2013
New Revision: 192798

URL: http://llvm.org/viewvc/llvm-project?rev=192798&view=rev
Log:
tsan: revert variable name change in test

It works as is with new llvm-symbolizer.


Modified:
    compiler-rt/trunk/lib/tsan/lit_tests/global_race.cc

Modified: compiler-rt/trunk/lib/tsan/lit_tests/global_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/global_race.cc?rev=192798&r1=192797&r2=192798&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/global_race.cc (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/global_race.cc Wed Oct 16 10:57:23 2013
@@ -4,7 +4,7 @@
 #include <stddef.h>
 
 int GlobalData[10];
-int qwerty;
+int x;
 namespace XXX {
   struct YYY {
     static int ZZZ[10];
@@ -14,19 +14,19 @@ namespace XXX {
 
 void *Thread(void *a) {
   GlobalData[2] = 42;
-  qwerty = 1;
+  x = 1;
   XXX::YYY::ZZZ[0] = 1;
   return 0;
 }
 
 int main() {
   fprintf(stderr, "addr=%p\n", GlobalData);
-  fprintf(stderr, "addr2=%p\n", &qwerty);
+  fprintf(stderr, "addr2=%p\n", &x);
   fprintf(stderr, "addr3=%p\n", XXX::YYY::ZZZ);
   pthread_t t;
   pthread_create(&t, 0, Thread, 0);
   GlobalData[2] = 43;
-  qwerty = 0;
+  x = 0;
   XXX::YYY::ZZZ[0] = 0;
   pthread_join(t, 0);
 }
@@ -37,6 +37,6 @@ int main() {
 // CHECK: WARNING: ThreadSanitizer: data race
 // CHECK: Location is global 'GlobalData' of size 40 at [[ADDR]] ({{.*}}+0x{{[0-9,a-f]+}})
 // CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Location is global 'qwerty' of size 4 at [[ADDR2]] ({{.*}}+0x{{[0-9,a-f]+}})
+// CHECK: Location is global 'x' of size 4 at [[ADDR2]] ({{.*}}+0x{{[0-9,a-f]+}})
 // CHECK: WARNING: ThreadSanitizer: data race
 // CHECK: Location is global 'XXX::YYY::ZZZ' of size 40 at [[ADDR3]] ({{.*}}+0x{{[0-9,a-f]+}})





More information about the llvm-commits mailing list