]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Linux/static_tls.cc
1 // REQUIRES: asan-64-bits
2 // Regression test: __tls_get_addr interceptor must recognize static TLS.
4 // RUN: %clangxx_asan -DSHARED %s -shared -o %t-so.so -fPIC
5 // RUN: %clangxx_asan %s -ldl -pthread -o %t %t-so.so
6 // RUN: %env_asan_opts=verbosity=2 %run %t 2>&1 | FileCheck %s
9 // CHECK: __tls_get_addr: static tls
12 // XFAIL: powerpc64, aarch64
18 int main(int argc
, char *argv
[]) {
19 fprintf(stderr
, "before\n");
21 fprintf(stderr
, "after\n");
25 static __thread
unsigned ThreadLocal
;