[patch v1] malloc: add malloc_zero_aborts tunable
Florian Weimer
fweimer@redhat.com
Mon Feb 16 16:56:35 GMT 2026
* DJ Delorie:
> Florian Weimer <fweimer@redhat.com> writes:
>> 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.
>
> The AI wasn't writing or testing the code, just helping me understand
> how glibc implemented ifuncs and pointing out gotchas. I actually found
> it very useful for learning and guiding, but not very accurate when it
> started to run out of suggestions. It really didn't want to admit defeat.
>
> As for the problems I was seeing, that was based on a modified libc.so
> and using gdb to see what was happening. I know ld.so has its own
> allocator and I know static libs are different; the problem was when
> ld.so was linking the test case to libc.so - it calls the resolvers at
> link time, and for malloc() that's before a lot of other stuff you'd
> expect. I assume there's a way to defer that resolution until the first
> call but I couldn't figure that out.
We can't do that for static builds, yes. I don't think that would be
particularly worthwhile anyway.
Thanks,
Florian
More information about the Libc-alpha
mailing list