[patch v1] malloc: add malloc_zero_aborts tunable
Florian Weimer
fweimer@redhat.com
Mon Feb 16 07:10:54 GMT 2026
* DJ Delorie:
> 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?
The AI is wrong, it would work as usual. The troublesome part is that
we need to build certain parts of malloc multiple times, which won't
improve the current source file situation.
Thanks,
Florian
More information about the Libc-alpha
mailing list