From 852eb1a52eba1d6d94c21adccad4725ee548a8f2 Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Thu, 8 Oct 2015 15:24:56 -0700 Subject: bionic: add electric fence into memory debug list, use code 15. To enable efence feature, just do "setprop libc.debug.malloc 15" Change-Id: I1ae6ae05a60a6813426f5cf35be08238613b0965 --- libc/bionic/malloc_debug_common.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libc/bionic/malloc_debug_common.cpp b/libc/bionic/malloc_debug_common.cpp index e0d439acf..fbf62f639 100644 --- a/libc/bionic/malloc_debug_common.cpp +++ b/libc/bionic/malloc_debug_common.cpp @@ -387,6 +387,9 @@ static void malloc_init_impl() { case 10: so_name = "libc_malloc_debug_leak.so"; break; + case 15: + so_name = "libefence.so"; + break; case 20: // Quick check: debug level 20 can only be handled in emulator. if (!qemu_running) { @@ -473,6 +476,9 @@ static void malloc_init_impl() { case 10: InitMalloc(malloc_impl_handle, &malloc_dispatch_table, "chk"); break; + case 15: + InitMalloc(malloc_impl_handle, &malloc_dispatch_table, "efence"); + break; case 20: InitMalloc(malloc_impl_handle, &malloc_dispatch_table, "qemu_instrumented"); break; -- cgit v1.2.3