[patch v1] malloc: add malloc_zero_aborts tunable

DJ Delorie dj@redhat.com
Fri Feb 13 18:17:02 GMT 2026


Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
> I think aborting is a bit of a blunt hammer

Yes!  I prefer a "crash early, crash obvious" response to problems I'm
interested in.

> It would be interesting to be able to enable logging of malloc(0)/realloc(0)
> calls just to see how frequently they occur. If that is possible inside a standard
> distro then one could trivially log usage across a large set of applications and
> usecases.

One could write a LD_PRELOAD library that just checks for this, too, but
that's a lot more overhead.



More information about the Libc-alpha mailing list