More debug malloc fixes.
Include the leaky executable's name in the log output. Fix the "sh" test.
Use uintptr_t instead of intptr_t.
Also fix debug formatting of NULL with %s.
Bug: 7291287
Change-Id: I015bf341cd48d43a247173612e6ccb1bf1243d53
diff --git a/libc/bionic/debug_format.cpp b/libc/bionic/debug_format.cpp
index e8d6a45..eeed3ac 100644
--- a/libc/bionic/debug_format.cpp
+++ b/libc/bionic/debug_format.cpp
@@ -460,6 +460,9 @@
if (c == 's') {
/* string */
str = va_arg(args, const char*);
+ if (str == NULL) {
+ str = "(null)";
+ }
} else if (c == 'c') {
/* character */
/* NOTE: char is promoted to int when passed through the stack */