From c15bffeb473d0b4a9f752b9fabc786832f407b64 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 18 Oct 2019 20:00:32 +0000 Subject: 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 --- lib/scudo/standalone/linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(&__get_tls()[TLS_SLOT_SANITIZER]); -- cgit v1.2.1