[compiler-rt] r375276 - scudo: Update TLS_SLOT_SANITIZER value.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 13:00:32 PDT 2019


Author: pcc
Date: Fri Oct 18 13:00:32 2019
New Revision: 375276

URL: http://llvm.org/viewvc/llvm-project?rev=375276&view=rev
Log:
scudo: Update TLS_SLOT_SANITIZER value.

Android now allocates only 8 fixed TLS slots. Somehow we were getting away
with using a non-existent slot until now, but in some cases the TLS slots
were being placed at the end of a page, which led to a segfault at startup.

Differential Revision: https://reviews.llvm.org/D69191

Modified:
    compiler-rt/trunk/lib/scudo/standalone/linux.h

Modified: compiler-rt/trunk/lib/scudo/standalone/linux.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/scudo/standalone/linux.h?rev=375276&r1=375275&r2=375276&view=diff
==============================================================================
--- compiler-rt/trunk/lib/scudo/standalone/linux.h (original)
+++ compiler-rt/trunk/lib/scudo/standalone/linux.h Fri Oct 18 13:00:32 2019
@@ -55,7 +55,7 @@ struct MapPlatformData {};
 // The Android Bionic team has allocated a TLS slot for sanitizers starting
 // with Q, given that Android currently doesn't support ELF TLS. It is used to
 // store sanitizer thread specific data.
-static const int TLS_SLOT_SANITIZER = 8; // TODO(kostyak): 6 for Q!!
+static const int TLS_SLOT_SANITIZER = 6;
 
 ALWAYS_INLINE uptr *getAndroidTlsPtr() {
   return reinterpret_cast<uptr *>(&__get_tls()[TLS_SLOT_SANITIZER]);




More information about the llvm-commits mailing list