diff options
author | Steven Laver <lavers@google.com> | 2019-08-07 15:49:43 -0700 |
---|---|---|
committer | Steven Laver <lavers@google.com> | 2019-08-07 15:49:43 -0700 |
commit | bfda022dd6fbbcea60e9f52496d90ece514b32da (patch) | |
tree | 97c69d2bdd0e0ff59d55a0d2a8596ed678cded3e /libc/malloc_debug/malloc_debug.cpp | |
parent | 70ebd716b3e81d304cda14d2bd77996cc2840962 (diff) | |
parent | 848e1d8a30a3465040edc27085927309fe6cbcff (diff) |
Merge RP1A.190528.001
Change-Id: If6e905407e26a19e0266185af46b4ff461c4d45e
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 423363fa9..d2679ca4c 100644 --- a/libc/malloc_debug/malloc_debug.cpp +++ b/libc/malloc_debug/malloc_debug.cpp @@ -258,12 +258,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; |