summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/lsan/lsan_common_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/lsan/lsan_common_linux.cc')
-rw-r--r--compiler-rt/lib/lsan/lsan_common_linux.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/lsan/lsan_common_linux.cc b/compiler-rt/lib/lsan/lsan_common_linux.cc
index 0e10d41914e..e73768e5824 100644
--- a/compiler-rt/lib/lsan/lsan_common_linux.cc
+++ b/compiler-rt/lib/lsan/lsan_common_linux.cc
@@ -22,6 +22,7 @@
#include "sanitizer_common/sanitizer_flags.h"
#include "sanitizer_common/sanitizer_linux.h"
#include "sanitizer_common/sanitizer_stackdepot.h"
+#include "lsan_allocator.h"
namespace __lsan {
@@ -38,6 +39,9 @@ static THREADLOCAL u32 current_thread_tid = kInvalidTid;
u32 GetCurrentThread() { return current_thread_tid; }
void SetCurrentThread(u32 tid) { current_thread_tid = tid; }
+static THREADLOCAL AllocatorCache allocator_cache;
+AllocatorCache *GetAllocatorCache() { return &allocator_cache; }
+
__attribute__((tls_model("initial-exec")))
THREADLOCAL int disable_counter;
bool DisabledInThisThread() { return disable_counter > 0; }
OpenPOWER on IntegriCloud