mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-19 22:10:19 +02:00
add prefix to reported errors
This commit is contained in:
parent
6372fee410
commit
6dfe33b4f1
1 changed files with 2 additions and 0 deletions
2
util.c
2
util.c
|
@ -6,6 +6,8 @@
|
|||
#include "util.h"
|
||||
|
||||
COLD noreturn void fatal_error(const char *s) {
|
||||
const char *prefix = "fatal allocator error: ";
|
||||
write(STDERR_FILENO, prefix, strlen(prefix));
|
||||
write(STDERR_FILENO, s, strlen(s));
|
||||
write(STDERR_FILENO, "\n", 1);
|
||||
abort();
|
||||
|
|
Loading…
Add table
Reference in a new issue