diff options
author | Francis Ricci <francisjricci@gmail.com> | 2017-03-20 13:45:29 +0000 |
---|---|---|
committer | Francis Ricci <francisjricci@gmail.com> | 2017-03-20 13:45:29 +0000 |
commit | 101784fa617fcaca1e75b1719a0827dd7a86cab5 (patch) | |
tree | daf7e2dbfee90fe09843b24fa7be96b1cc2d58ea /lib/lsan/lsan_common_mac.cc | |
parent | 5b350130fc4bf6f70c078a5d97096df98a17a057 (diff) |
Revert "Use pthreads for thread-local lsan allocator cache on darwin"
This is still failing stack-use-after-return on linux-aarch64.
This reverts commit 5b350130fc4bf6f70c078a5d97096df98a17a057.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/lsan_common_mac.cc')
-rw-r--r-- | lib/lsan/lsan_common_mac.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/lsan/lsan_common_mac.cc b/lib/lsan/lsan_common_mac.cc index f70ebdd0e..7f5e0550d 100644 --- a/lib/lsan/lsan_common_mac.cc +++ b/lib/lsan/lsan_common_mac.cc @@ -12,14 +12,12 @@ // //===----------------------------------------------------------------------===// +#include "sanitizer_common/sanitizer_allocator_internal.h" #include "sanitizer_common/sanitizer_platform.h" #include "lsan_common.h" #if CAN_SANITIZE_LEAKS && SANITIZER_MAC -#include "sanitizer_common/sanitizer_allocator_internal.h" -#include "lsan_allocator.h" - #include <pthread.h> namespace __lsan { @@ -27,7 +25,6 @@ namespace __lsan { typedef struct { int disable_counter; u32 current_thread_id; - AllocatorCache cache; } thread_local_data_t; static pthread_key_t key; @@ -43,7 +40,6 @@ static thread_local_data_t *get_tls_val() { ptr = (thread_local_data_t *)InternalAlloc(sizeof(*ptr)); ptr->disable_counter = 0; ptr->current_thread_id = kInvalidTid; - ptr->cache = AllocatorCache(); pthread_setspecific(key, ptr); } @@ -66,8 +62,6 @@ u32 GetCurrentThread() { return get_tls_val()->current_thread_id; } void SetCurrentThread(u32 tid) { get_tls_val()->current_thread_id = tid; } -AllocatorCache *GetAllocatorCache() { return &get_tls_val()->cache; } - void InitializePlatformSpecificModules() { CHECK(0 && "unimplemented"); } |