summaryrefslogtreecommitdiff
path: root/malloc/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r--malloc/malloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 2527e25047..54e406bcb6 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -5397,7 +5397,8 @@ malloc_printerr (int action, const char *str, void *ptr, mstate ar_ptr)
set_arena_corrupt (ar_ptr);
if ((action & 5) == 5)
- __libc_message (action & 2, "%s\n", str);
+ __libc_message ((action & 2) ? (do_abort | do_backtrace) : do_message,
+ "%s\n", str);
else if (action & 1)
{
char buf[2 * sizeof (uintptr_t) + 1];
@@ -5407,7 +5408,8 @@ malloc_printerr (int action, const char *str, void *ptr, mstate ar_ptr)
while (cp > buf)
*--cp = '0';
- __libc_message (action & 2, "*** Error in `%s': %s: 0x%s ***\n",
+ __libc_message ((action & 2) ? (do_abort | do_backtrace) : do_message,
+ "*** Error in `%s': %s: 0x%s ***\n",
__libc_argv[0] ? : "<unknown>", str, cp);
}
else if (action & 2)