diff options
author | Kostya Serebryany <kcc@google.com> | 2014-01-30 09:25:48 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2014-01-30 09:25:48 +0000 |
commit | b22298af9ab79c10215321faed0bf9d163629b6d (patch) | |
tree | d9f52080fcac6872ac41745ebbddbcb5be84dc6f | |
parent | 409d26ac5e81f5de3feb96f7d0c3cab04e47f406 (diff) | |
download | bcm5719-llvm-b22298af9ab79c10215321faed0bf9d163629b6d.tar.gz bcm5719-llvm-b22298af9ab79c10215321faed0bf9d163629b6d.zip |
[asan] re-enable __tls_get_addr interceptor with a proper fix (use __attribute__((tls_model(initial-exec))))
llvm-svn: 200463
3 files changed, 3 insertions, 5 deletions
diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/stress_dtls.c b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/stress_dtls.c index de4c98cc3df..4e22f8ae9a1 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/stress_dtls.c +++ b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/stress_dtls.c @@ -1,5 +1,3 @@ -// Currently broken... -// XFAIL: * // REQUIRES: asan-64-bits // Stress test dynamic TLS + dlopen + threads. // diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index 4b6d6e96a04..c43ef8fbe9d 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -177,6 +177,6 @@ #define SANITIZER_INTERCEPT_PTHREAD_COND SI_NOT_WINDOWS #define SANITIZER_INTERCEPT_PTHREAD_SETNAME_NP SI_LINUX_NOT_ANDROID -#define SANITIZER_INTERCEPT_TLS_GET_ADDR 0 // SI_LINUX_NOT_ANDROID +#define SANITIZER_INTERCEPT_TLS_GET_ADDR SI_LINUX_NOT_ANDROID #endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cc b/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cc index 73e34469aff..37def75914a 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cc @@ -33,8 +33,8 @@ struct Glibc_2_19_tls_header { uptr start; }; -// This must be static TLS, i.e. the run-time should be build with -// -ftls-model=initial-exec or equivalent. +// This must be static TLS +__attribute__((tls_model("initial-exec"))) static __thread DTLS dtls; // Make sure we properly destroy the DTLS objects: |