[compiler-rt] r182858 - [asan] Fix r182854: run the unpoison_tls test only on Linux.

Sergey Matveev earthdok at google.com
Wed May 29 07:37:04 PDT 2013


Author: smatveev
Date: Wed May 29 09:37:04 2013
New Revision: 182858

URL: http://llvm.org/viewvc/llvm-project?rev=182858&view=rev
Log:
[asan] Fix r182854: run the unpoison_tls test only on Linux.

Added:
    compiler-rt/trunk/lib/asan/lit_tests/Linux/unpoison_tls.cc
      - copied, changed from r182857, compiler-rt/trunk/lib/asan/lit_tests/unpoison_tls.cc
Removed:
    compiler-rt/trunk/lib/asan/lit_tests/unpoison_tls.cc

Copied: compiler-rt/trunk/lib/asan/lit_tests/Linux/unpoison_tls.cc (from r182857, compiler-rt/trunk/lib/asan/lit_tests/unpoison_tls.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/Linux/unpoison_tls.cc?p2=compiler-rt/trunk/lib/asan/lit_tests/Linux/unpoison_tls.cc&p1=compiler-rt/trunk/lib/asan/lit_tests/unpoison_tls.cc&r1=182857&r2=182858&rev=182858&view=diff
==============================================================================
    (empty)

Removed: compiler-rt/trunk/lib/asan/lit_tests/unpoison_tls.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/unpoison_tls.cc?rev=182857&view=auto
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/unpoison_tls.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/unpoison_tls.cc (removed)
@@ -1,40 +0,0 @@
-// Test that TLS is unpoisoned on thread death.
-// REQUIRES: x86_64-supported-target,i386-supported-target
-
-// RUN: %clangxx_asan -m64 -O1 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1
-// RUN: %clangxx_asan -m32 -O1 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1
-
-#include <assert.h>
-#include <pthread.h>
-#include <stdio.h>
-
-#include <sanitizer/asan_interface.h>
-
-__thread int64_t tls_var[2];
-
-volatile int64_t *p_tls_var;
-
-void *first(void *arg) {
-  ASAN_POISON_MEMORY_REGION(&tls_var, sizeof(tls_var));
-  p_tls_var = tls_var;
-  return 0;
-}
-
-void *second(void *arg) {
-  assert(tls_var == p_tls_var);
-  *p_tls_var = 1;
-  return 0;
-}
-
-int main(int argc, char *argv[]) {
-  pthread_t p;
-  assert(0 == pthread_create(&p, 0, first, 0));
-  assert(0 == pthread_join(p, 0));
-  assert(0 == pthread_create(&p, 0, second, 0));
-  assert(0 == pthread_join(p, 0));
-  return 0;
-}





More information about the llvm-commits mailing list