From f10ba2ab250b04e47868cfb888df22058436173d Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 1 Nov 2023 09:56:10 -0300 Subject: [PATCH] linux: Decorate __libc_fatal error buffer Reviewed-by: DJ Delorie --- sysdeps/posix/libc_fatal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/posix/libc_fatal.c b/sysdeps/posix/libc_fatal.c index cf28387..f564d23 100644 --- a/sysdeps/posix/libc_fatal.c +++ b/sysdeps/posix/libc_fatal.c @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef FATAL_PREPARE_INCLUDE #include FATAL_PREPARE_INCLUDE @@ -116,6 +117,8 @@ __libc_message_impl (const char *fmt, ...) wp = mempcpy (wp, iov[cnt].iov_base, iov[cnt].iov_len); *wp = '\0'; + __set_vma_name (buf, total, " glibc: fatal"); + /* We have to free the old buffer since the application might catch the SIGABRT signal. */ struct abort_msg_s *old = atomic_exchange_acquire (&__abort_msg, -- 2.7.4