Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit c15bffe

Browse files
committed
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@375276 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 749af53 commit c15bffe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/scudo/standalone/linux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct MapPlatformData {};
5555
// The Android Bionic team has allocated a TLS slot for sanitizers starting
5656
// with Q, given that Android currently doesn't support ELF TLS. It is used to
5757
// store sanitizer thread specific data.
58-
static const int TLS_SLOT_SANITIZER = 8; // TODO(kostyak): 6 for Q!!
58+
static const int TLS_SLOT_SANITIZER = 6;
5959

6060
ALWAYS_INLINE uptr *getAndroidTlsPtr() {
6161
return reinterpret_cast<uptr *>(&__get_tls()[TLS_SLOT_SANITIZER]);

0 commit comments

Comments
 (0)