[PATCH 0/3] Internal asserts cleanups
Florian Weimer
fweimer@redhat.com
Mon Aug 1 10:45:36 GMT 2022
Internal asserts do not need to write to stderr (and call into libio).
These small series redefines __assert_fail inside libc itself, so that
it more reliably terminates the process.
Thanks,
Florian
Florian Weimer (3):
stdio: Clean up __libc_message after unconditional abort
nptl: Remove uses of assert_perror
assert: Do not use stderr in libc-internal assert
assert/Makefile | 7 +++++-
assert/__libc_assert_fail.c | 33 ++++++++++++++++++++++++++
assert/assert.c | 1 -
debug/fortify_fail.c | 4 +---
elf/Makefile | 1 +
include/assert.h | 12 +++++++---
include/stdio.h | 9 +------
malloc/malloc.c | 19 +--------------
stdlib/tst-bz20544.c | 2 +-
sysdeps/nptl/gai_misc.h | 11 +++------
sysdeps/posix/libc_fatal.c | 47 +++++++++++++++++--------------------
11 files changed, 77 insertions(+), 69 deletions(-)
create mode 100644 assert/__libc_assert_fail.c
base-commit: 5fded9c44537283593a7f839347f831e15726572
--
2.35.3
More information about the Libc-alpha
mailing list