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

llvm-svn: 375276
This commit is contained in:
Peter Collingbourne 2019-10-18 20:00:32 +00:00
parent 788acc6ff8
commit cf25242daa
1 changed files with 1 additions and 1 deletions

View File

@ -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]);