[PATCH] Use size_t for mallinfo fields.
Florian Weimer
fweimer@redhat.com
Tue Jul 7 13:49:12 GMT 2020
* Martin Liška:
> On 7/7/20 2:17 PM, Andreas Schwab wrote:
>> On Jul 07 2020, Martin Liška wrote:
>>
>>> The current int type can easily overflow for allocation of more
>>> than 4GB.
>>>
>>> The following patch changes that to size_t. I guess I need to adjust
>>> the API version of the function, right?
>>
>> Not only that, it breaks the ABI of mallinfo.
>
> Sure, so what options do I have? I'm new to glibc so a hint would be
> appreciated.
We need to add a new function. Symbol versioning does not work because
mallinfo is interposed by alternative mallocs (tcmalloc, Address
Sanitizer, etc.). Without the new function name, the interposer does
not know which ABI the application expects, so it's going to be quite
messy.
Thanks,
Florian
More information about the Libc-alpha
mailing list