Merge "Change name of MB_CUR_MAX implementation function." into lmp-dev
diff --git a/libc/Android.mk b/libc/Android.mk
index 2007965..727513c 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -278,7 +278,6 @@
     upstream-netbsd/lib/libc/regex/regerror.c \
     upstream-netbsd/lib/libc/regex/regexec.c \
     upstream-netbsd/lib/libc/regex/regfree.c \
-    upstream-netbsd/lib/libc/resolv/mtctxres.c \
     upstream-netbsd/lib/libc/stdlib/bsearch.c \
     upstream-netbsd/lib/libc/stdlib/div.c \
     upstream-netbsd/lib/libc/stdlib/drand48.c \
@@ -634,6 +633,7 @@
     $(call all-c-files-under,dns) \
     upstream-netbsd/lib/libc/isc/ev_streams.c \
     upstream-netbsd/lib/libc/isc/ev_timers.c \
+    upstream-netbsd/lib/libc/resolv/mtctxres.c \
 
 LOCAL_CFLAGS := \
     $(libc_common_cflags) \
diff --git a/libc/bionic/malloc_debug_leak.cpp b/libc/bionic/malloc_debug_leak.cpp
index 837dccc..27b6714 100644
--- a/libc/bionic/malloc_debug_leak.cpp
+++ b/libc/bionic/malloc_debug_leak.cpp
@@ -481,11 +481,15 @@
             return 0;
         }
 
+        // TODO: Temporary workaround to avoid a crash b/16874447.
+        return header->entry->size & ~SIZE_FLAG_MASK;
+#if 0
         size_t ret = g_malloc_dispatch->malloc_usable_size(header);
         if (ret != 0) {
             // The usable area starts at 'mem' and stops at 'header+ret'.
             return reinterpret_cast<uintptr_t>(header) + ret - reinterpret_cast<uintptr_t>(mem);
         }
+#endif
     }
     return 0;
 }