summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/lit_tests/java_race.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-14 14:35:48 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-14 14:35:48 +0000
commite6a6183e9b8ecf7dec8808fa87577d5b574ca22e (patch)
treea6e5f3181f2e0c4ffc21f9648c5e9c873f34b330 /compiler-rt/lib/tsan/lit_tests/java_race.cc
parent9f20d6703479a952465f7db0c2fbd70904c030c2 (diff)
downloadbcm5719-llvm-e6a6183e9b8ecf7dec8808fa87577d5b574ca22e.tar.gz
bcm5719-llvm-e6a6183e9b8ecf7dec8808fa87577d5b574ca22e.zip
Move TSan lit-tests under test/tsan
llvm-svn: 201414
Diffstat (limited to 'compiler-rt/lib/tsan/lit_tests/java_race.cc')
-rw-r--r--compiler-rt/lib/tsan/lit_tests/java_race.cc23
1 files changed, 0 insertions, 23 deletions
diff --git a/compiler-rt/lib/tsan/lit_tests/java_race.cc b/compiler-rt/lib/tsan/lit_tests/java_race.cc
deleted file mode 100644
index 4841a7db0a9..00000000000
--- a/compiler-rt/lib/tsan/lit_tests/java_race.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s
-#include "java.h"
-
-void *Thread(void *p) {
- *(int*)p = 42;
- return 0;
-}
-
-int main() {
- int const kHeapSize = 1024 * 1024;
- void *jheap = malloc(kHeapSize);
- __tsan_java_init((jptr)jheap, kHeapSize);
- const int kBlockSize = 16;
- __tsan_java_alloc((jptr)jheap, kBlockSize);
- pthread_t th;
- pthread_create(&th, 0, Thread, jheap);
- *(int*)jheap = 43;
- pthread_join(th, 0);
- __tsan_java_free((jptr)jheap, kBlockSize);
- return __tsan_java_fini();
-}
-
-// CHECK: WARNING: ThreadSanitizer: data race
OpenPOWER on IntegriCloud