From 941a6ec9bb9d325d029deeac81c7e7c9ff68d310 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 6 Aug 2012 15:13:22 +0000 Subject: [PATCH] [ASan] fix names of malloc/free replacements on Android llvm-svn: 161322 --- compiler-rt/lib/asan/asan_malloc_linux.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/asan/asan_malloc_linux.cc b/compiler-rt/lib/asan/asan_malloc_linux.cc index 1046f4c843a8..1fe848d6880c 100644 --- a/compiler-rt/lib/asan/asan_malloc_linux.cc +++ b/compiler-rt/lib/asan/asan_malloc_linux.cc @@ -21,6 +21,12 @@ #include "asan_stack.h" #ifdef ANDROID +DECLARE_REAL_AND_INTERCEPTOR(void*, malloc, uptr size); +DECLARE_REAL_AND_INTERCEPTOR(void, free, void *ptr); +DECLARE_REAL_AND_INTERCEPTOR(void*, calloc, uptr nmemb, uptr size); +DECLARE_REAL_AND_INTERCEPTOR(void*, realloc, void *ptr, uptr size); +DECLARE_REAL_AND_INTERCEPTOR(void*, memalign, uptr boundary, uptr size); + struct MallocDebug { void* (*malloc)(uptr bytes); void (*free)(void* mem); @@ -30,7 +36,7 @@ struct MallocDebug { }; const MallocDebug asan_malloc_dispatch ALIGNED(32) = { - malloc, free, calloc, realloc, memalign + WRAP(malloc), WRAP(free), WRAP(calloc), WRAP(realloc), WRAP(memalign) }; extern "C" const MallocDebug* __libc_malloc_dispatch; -- GitLab