[PATCH] D29236: [compiler-rt] Don't change g_tls_size after initialization.
Tim Shen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 18:04:57 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL293586: [compiler-rt] Don't change g_tls_size after initialization. (authored by timshen).
Changed prior to commit:
https://reviews.llvm.org/D29236?vs=86141&id=86378#toc
Repository:
rL LLVM
https://reviews.llvm.org/D29236
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
@@ -270,9 +270,7 @@
# endif
const uptr kTlsAlign = 16;
const uptr kTlsPreTcbSize =
- (ThreadDescriptorSize() + kTcbHead + kTlsAlign - 1) & ~(kTlsAlign - 1);
- InitTlsSize();
- g_tls_size = (g_tls_size + kTlsPreTcbSize + kTlsAlign -1) & ~(kTlsAlign - 1);
+ RoundUpTo(ThreadDescriptorSize() + kTcbHead, kTlsAlign);
return kTlsPreTcbSize;
}
#endif
@@ -379,6 +377,8 @@
uptr addr, size;
GetTls(&addr, &size);
return size;
+#elif defined(__mips__) || defined(__powerpc64__)
+ return RoundUpTo(g_tls_size + TlsPreTcbSize(), 16);
#else
return g_tls_size;
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29236.86378.patch
Type: text/x-patch
Size: 872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170131/fc0136e1/attachment.bin>
More information about the llvm-commits
mailing list