summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-10-18 20:00:32 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-10-18 20:00:32 +0000
commitc15bffeb473d0b4a9f752b9fabc786832f407b64 (patch)
tree98bb12907e7b7b30efb84a42f1801b426a20bab2
parent749af53928a31afa3111f27cc41fd15849d86667 (diff)
downloadcompiler-rt-c15bffeb473d0b4a9f752b9fabc786832f407b64.tar.gz
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
-rw-r--r--lib/scudo/standalone/linux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scudo/standalone/linux.h b/lib/scudo/standalone/linux.h
index 92c9eb5e9..c8e41484c 100644
--- a/lib/scudo/standalone/linux.h
+++ b/lib/scudo/standalone/linux.h
@@ -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]);