[compiler-rt] r282571 - [lsan] [aarch64] Fix calculating TLS area
Strahinja Petrovic via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 03:15:16 PDT 2016
Author: spetrovic
Date: Wed Sep 28 05:15:15 2016
New Revision: 282571
URL: http://llvm.org/viewvc/llvm-project?rev=282571&view=rev
Log:
[lsan] [aarch64] Fix calculating TLS area
This patch fixes calculating begin of TLS area on AARCH64.
Differential Revision: https://reviews.llvm.org/D24454
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=282571&r1=282570&r2=282571&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc Wed Sep 28 05:15:15 2016
@@ -298,7 +298,10 @@ uptr ThreadSelf() {
rdhwr %0,$29;\
.set pop" : "=r" (thread_pointer));
descr_addr = thread_pointer - kTlsTcbOffset - TlsPreTcbSize();
-# elif defined(__aarch64__) || defined(__s390__)
+# elif defined(__aarch64__)
+ descr_addr = reinterpret_cast<uptr>(__builtin_thread_pointer()) -
+ ThreadDescriptorSize();
+# elif defined(__s390__)
descr_addr = reinterpret_cast<uptr>(__builtin_thread_pointer());
# elif defined(__powerpc64__)
// PPC64LE uses TLS variant I. The thread pointer (in GPR 13)
More information about the llvm-commits
mailing list