diff options
author | Elliott Hughes <enh@google.com> | 2013-04-05 18:25:21 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-04-05 18:25:21 +0000 |
commit | 240fb8623b1fe027d0d33a9d4c41d99ceb385b58 (patch) | |
tree | 3f8efc05d80658c9be48513238104a5de01a9951 /libc/bionic/dlmalloc.c | |
parent | 014c75c78bdcad8acde8d0abb2450aa1f78e1a1f (diff) | |
parent | 0d787c1fa18c6a1f29ef9840e28a68cf077be1de (diff) | |
download | android_bionic-240fb8623b1fe027d0d33a9d4c41d99ceb385b58.tar.gz android_bionic-240fb8623b1fe027d0d33a9d4c41d99ceb385b58.tar.bz2 android_bionic-240fb8623b1fe027d0d33a9d4c41d99ceb385b58.zip |
Merge "Make abort messages available to debuggerd."
Diffstat (limited to 'libc/bionic/dlmalloc.c')
-rw-r--r-- | libc/bionic/dlmalloc.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/libc/bionic/dlmalloc.c b/libc/bionic/dlmalloc.c index cf09aacf0..51c62a707 100644 --- a/libc/bionic/dlmalloc.c +++ b/libc/bionic/dlmalloc.c @@ -16,15 +16,7 @@ #include "dlmalloc.h" -#include <fcntl.h> -#include <stdlib.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <sys/types.h> - -#include <linux/ashmem.h> - -#include <private/libc_logging.h> +#include "private/libc_logging.h" // Send dlmalloc errors to the log. static void __bionic_heap_corruption_error(const char* function); @@ -37,15 +29,12 @@ static void __bionic_heap_usage_error(const char* function, void* address); #include "../upstream-dlmalloc/malloc.c" static void __bionic_heap_corruption_error(const char* function) { - __libc_format_log(ANDROID_LOG_FATAL, "libc", "@@@ ABORTING: heap corruption detected by %s", - function); - abort(); + __libc_fatal("@@@ ABORTING: heap corruption detected by %s", function); } static void __bionic_heap_usage_error(const char* function, void* address) { - __libc_format_log(ANDROID_LOG_FATAL, "libc", - "@@@ ABORTING: invalid address or address of corrupt block %p passed to %s", - address, function); + __libc_fatal("@@@ ABORTING: invalid address or address of corrupt block %p passed to %s", + address, function); // So that we can get a memory dump around the specific address. *((int**) 0xdeadbaad) = (int*) address; } |