aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Wang <ewang@cyngn.com>2015-10-08 15:24:56 -0700
committerEdward Wang <ewang@cyngn.com>2015-10-12 16:33:32 -0700
commit852eb1a52eba1d6d94c21adccad4725ee548a8f2 (patch)
tree216dd7efcf4f1b55203cc09028a008f046703d81
parent12eb9c556ad50585bf0067974c4db41ce2fe0784 (diff)
downloadandroid_bionic-cm-12.1.tar.gz
android_bionic-cm-12.1.tar.bz2
android_bionic-cm-12.1.zip
bionic: add electric fence into memory debug list, use code 15.cm-12.1
To enable efence feature, just do "setprop libc.debug.malloc 15" Change-Id: I1ae6ae05a60a6813426f5cf35be08238613b0965
-rw-r--r--libc/bionic/malloc_debug_common.cpp6
1 files changed, 6 insertions, 0 deletions
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;