From: "Martin Liška" <mliska@suse.cz>
To: Florian Weimer <fweimer@redhat.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>, libc-alpha@sourceware.org
Subject: Re: [PATCH] Use size_t for mallinfo fields.
Date: Thu, 23 Jul 2020 12:23:14 +0200 [thread overview]
Message-ID: <a79922af-057d-3ed4-a8d2-4a13b69f2fd1@suse.cz> (raw)
In-Reply-To: <093814cf-0b7d-1011-08e7-4d5c3e56b423@suse.cz>
PING^1
On 7/8/20 9:24 AM, Martin Liška wrote:
> On 7/7/20 4:22 PM, Florian Weimer wrote:
>> * Martin Liška:
>>
>>> On 7/7/20 3:49 PM, Florian Weimer wrote:
>>>> * 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.
>>
>>> All right, am I closer with the suggested patch?
>>
>> If what I wrote above is right (we'd first gather consensus around
>> that), we should probably add struct mallinfo2 and mallinfo2, deprecate
>> the original mallinfo function, and eventually remove them from the
>> public API (turning the original mallinfo into a compatibility symbol).
>
> All right, I'm sending patch for that.
>
>>
>> I suppose it would make sense to raise this issue with the tcmalloc, tbb
>> and Address Sanitizer people, to see if they would be willing to
>> implement mallinfo2 on their end.
>
> Once we're done I can file issues to all these to inform them.
>
> Thoughts?
> Martin
>
>>
>> The end result, having mallinfo2 and not mallinfo, is a bit ugly, but
>> it's an improvement over the current state. I do not see a need to get
>> creative with symbol redirects or symbol versions.
>>
>> Thanks,
>> Florian
>>
>
next prev parent reply other threads:[~2020-07-23 10:23 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 12:00 [PATCH] Use size_t for mallinfo fields Martin Liška
2020-07-07 12:17 ` Andreas Schwab
2020-07-07 13:07 ` Martin Liška
2020-07-07 13:19 ` H.J. Lu via Libc-alpha
2020-07-07 13:49 ` Florian Weimer via Libc-alpha
2020-07-07 13:52 ` Martin Liška
2020-07-07 14:22 ` Florian Weimer via Libc-alpha
2020-07-07 14:32 ` Andreas Schwab
2020-07-07 14:36 ` Florian Weimer via Libc-alpha
2020-07-08 7:25 ` Martin Liška
2020-07-08 7:24 ` Martin Liška
2020-07-23 10:23 ` Martin Liška [this message]
2020-07-23 14:38 ` Szabolcs Nagy
2020-07-27 12:08 ` Martin Liška
2020-07-27 12:21 ` Florian Weimer via Libc-alpha
2020-07-27 12:45 ` Martin Liška
2020-08-11 12:26 ` Martin Liška
2020-08-11 13:44 ` Florian Weimer
2020-08-11 17:08 ` DJ Delorie via Libc-alpha
2020-08-12 12:29 ` Martin Liška
2020-08-24 9:55 ` Martin Liška
2020-08-28 19:05 ` DJ Delorie via Libc-alpha
2020-08-31 13:35 ` H.J. Lu via Libc-alpha
2020-08-31 13:56 ` Adhemerval Zanella via Libc-alpha
2020-08-31 14:00 ` H.J. Lu via Libc-alpha
2020-08-31 14:10 ` Adhemerval Zanella via Libc-alpha
2020-09-01 17:26 ` Joseph Myers
2020-09-02 13:19 ` Martin Liška
2020-09-02 13:34 ` Adhemerval Zanella via Libc-alpha
2020-09-02 14:00 ` Carlos O'Donell via Libc-alpha
2020-09-02 16:11 ` DJ Delorie via Libc-alpha
2020-09-21 8:49 ` Martin Liška
2020-09-02 20:16 ` DJ Delorie via Libc-alpha
2020-09-02 20:24 ` Florian Weimer
2020-09-02 21:04 ` [PATCH/v2] " DJ Delorie via Libc-alpha
2020-09-03 11:17 ` Adhemerval Zanella via Libc-alpha
2020-09-03 21:33 ` DJ Delorie via Libc-alpha
2020-09-17 23:02 ` DJ Delorie via Libc-alpha
2020-09-02 20:25 ` [PATCH] " Joseph Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a79922af-057d-3ed4-a8d2-4a13b69f2fd1@suse.cz \
--to=mliska@suse.cz \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).