diff options
author | Christopher Ferris <cferris@google.com> | 2019-05-24 05:44:56 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-05-24 05:44:56 +0000 |
commit | 497d7169d47f47a62e01f2bc85755a364645117d (patch) | |
tree | c040ded19a9f66174b8110a21e7ee244a87e2345 /libc/malloc_debug/malloc_debug.cpp | |
parent | 30d4c6fb06b343d591e85a16345bf6b927420ea1 (diff) | |
parent | 705de3c6398d53b780d731008bafc3c2dafbbf85 (diff) |
Merge "Disable malloc debug when asan enabled."
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
-rw-r--r-- | libc/malloc_debug/malloc_debug.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/malloc_debug/malloc_debug.cpp b/libc/malloc_debug/malloc_debug.cpp index 53fcead01..c030d5429 100644 --- a/libc/malloc_debug/malloc_debug.cpp +++ b/libc/malloc_debug/malloc_debug.cpp @@ -252,12 +252,19 @@ static void* InitHeader(Header* header, void* orig_pointer, size_t size) { return g_debug->GetPointer(header); } +extern "C" void __asan_init() __attribute__((weak)); + bool debug_initialize(const MallocDispatch* malloc_dispatch, bool* zygote_child, const char* options) { if (zygote_child == nullptr || options == nullptr) { return false; } + if (__asan_init != 0) { + error_log("malloc debug cannot be enabled alongside ASAN"); + return false; + } + InitAtfork(); g_zygote_child = zygote_child; |