diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-02 10:01:07 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-02 10:01:07 +0000 |
commit | c1bc2989fb3c5f9c748083789f0e9005fb9c92e8 (patch) | |
tree | dff561187c055ba84a038dc01d6fd51dc5c6fb48 /libc/malloc_debug/malloc_debug.cpp | |
parent | f5416bfd9e178b3d57620c6ac1058c8d20e67e3d (diff) | |
parent | 57d945d1bb7fc8e1f60f151e7bac6fc1ed998053 (diff) |
Snap for 7602994 from 57d945d1bb7fc8e1f60f151e7bac6fc1ed998053 to s-keystone-qcom-release
Change-Id: I4e238044391e3b2abd954fff579faa63de76ebd1
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
-rw-r--r-- | libc/malloc_debug/malloc_debug.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libc/malloc_debug/malloc_debug.cpp b/libc/malloc_debug/malloc_debug.cpp index b27853a9a..e435f8efb 100644 --- a/libc/malloc_debug/malloc_debug.cpp +++ b/libc/malloc_debug/malloc_debug.cpp @@ -385,10 +385,9 @@ void debug_finalize() { backtrace_shutdown(); - delete g_debug; - g_debug = nullptr; - - DebugDisableFinalize(); + // In order to prevent any issues of threads freeing previous pointers + // after the main thread calls this code, simply leak the g_debug pointer + // and do not destroy the debug disable pthread key. } void debug_get_malloc_leak_info(uint8_t** info, size_t* overall_size, size_t* info_size, |