From 84f8b5f4013c5df372ad97f3f98ea27ac6064a97 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 22 Jan 2013 18:35:14 -0800 Subject: [PATCH] Disable leak checking for mksh; it's way too leaky. When each shell leaks ~240 allocations, you can't see the leaks from the program you ran with "adb shell". Bug: 7291287 Change-Id: Ib8780db72ba0114ebdb24768537da74bbb61f354 --- libc/bionic/malloc_debug_common.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc/bionic/malloc_debug_common.cpp b/libc/bionic/malloc_debug_common.cpp index bba0472e3..6e1ee70dd 100644 --- a/libc/bionic/malloc_debug_common.cpp +++ b/libc/bionic/malloc_debug_common.cpp @@ -376,6 +376,11 @@ static void malloc_init_impl() { } } + // mksh is way too leaky. http://b/7291287. + if (debug_level >= 10 && strcmp(__progname, "sh") == 0) { + return; + } + // Choose the appropriate .so for the requested debug level. switch (debug_level) { case 1: