diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-05-25 23:11:20 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-05-25 23:11:20 +0000 |
commit | 848e1d8a30a3465040edc27085927309fe6cbcff (patch) | |
tree | 03c1b6a86306f0c5624ebee660f19389484df699 /libc/malloc_debug/malloc_debug.cpp | |
parent | bdc1d1886a1ba79b89a94895c26f0796156af46a (diff) | |
parent | e8ba38752235fe165715de9fdb3e8fb8489bd00e (diff) |
Snap for 5605895 from e8ba38752235fe165715de9fdb3e8fb8489bd00e to rvc-release
Change-Id: I83b02af5bb1b2fa7e50a55c723d83b6697a36c9c
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; |