diff mbox series

[v3,5/7] assert: Decorate error message buffer

Message ID 20231101125611.208544-6-adhemerval.zanella@linaro.org
State New
Headers show
Series Add a tunable to decorate anonymous memory maps | expand

Commit Message

Adhemerval Zanella Netto Nov. 1, 2023, 12:56 p.m. UTC
---
 assert/assert.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/assert/assert.c b/assert/assert.c
index b7c7a4a1ba..bf0f4a69f5 100644
--- a/assert/assert.c
+++ b/assert/assert.c
@@ -24,6 +24,7 @@ 
 #include <sysdep.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <setvmaname.h>
 
 
 extern const char *__progname;
@@ -71,6 +72,7 @@  __assert_fail_base (const char *fmt, const char *assertion, const char *file,
 	{
 	  buf->size = total;
 	  strcpy (buf->msg, str);
+	  __set_vma_name (buf, total, " glibc: assert");
 
 	  /* We have to free the old buffer since the application might
 	     catch the SIGABRT signal.  */