Merge "Disable malloc debug when asan enabled."

am: 497d7169d4

Change-Id: Ica1d3120015d81c454809c8ba234169a7256542f
This commit is contained in:
Christopher Ferris 2019-05-23 22:56:06 -07:00 committed by android-build-merger
commit 39677eae59

View file

@ -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;