[PATCH] malloc: Simplify implementation of __malloc_assert
Florian Weimer
fweimer@redhat.com
Thu Jul 21 13:28:48 GMT 2022
* Adhemerval Zanella Netto:
> And since the idea here is to avoid the malloc from __asprintf, would
> be better to make __assert_fail_base call __libc_message (which will
> either call alloca or mmap) ? Then there is no need to reimplement it
> for malloc.
No, assert is required to print to stderr (the stdio stream) by POSIX
and ISO C. But we don't want to call into libio after detecting heap
corruption.
Thanks,
Florian
More information about the Libc-alpha
mailing list