[patch v1] malloc: add malloc_zero_aborts tunable
DJ Delorie
dj@redhat.com
Sat Feb 14 02:20:37 GMT 2026
Florian Weimer <fweimer@redhat.com> writes:
> We should really be using IFUNCs to select the entry points to the
> malloc code.
So this is turning out to be much more complex than anticipated. After
a day of coding, mostly debugging, and many long conversations with an
AI about what was happening, it boils down to this:
* The malloc API's resolvers run VERY early in libc.so's loading
* ld.so's tunable_get_val() is not yet linked and crashes if you try to
call it.
* __tunable_list[] is not available to libc.so
* there's nothing relevent in rtld_global[]
* _environ[] is also not initialized at this point
* there doesn't seem to be a way to get anything user-related to the
resolver at that early stage in libc loading
* Even AIs start to hallucinate when dealing with glibc's internals ;-)
Suggestions?
More information about the Libc-alpha
mailing list