![]() |
|
Message-ID: <gziexpj3sw6uik47wkwtneqzp5wb7yyy37gzudkub3kluskch3@nej6exxm5ra7>
Date: Sat, 21 Jun 2025 14:08:07 +0200
From: Alejandro Colomar <alx@...nel.org>
To: Sam James <sam@...too.org>
Cc: Eric Blake <eblake@...hat.com>, Rich Felker <dalias@...c.org>,
enh <enh@...gle.com>, Florian Weimer <fweimer@...hat.com>,
Adhemerval Zanella Netto <adhemerval.zanella@...aro.org>, musl@...ts.openwall.com, libc-alpha@...rceware.org,
Joseph Myers <josmyers@...hat.com>, наб <nabijaczleweli@...ijaczleweli.xyz>,
Paul Eggert <eggert@...ucla.edu>, Robert Seacord <rcseacord@...il.com>,
Bruno Haible <bruno@...sp.org>, bug-gnulib@....org, JeanHeyd Meneide <phdofthehouse@...il.com>,
Thorsten Glaser <tg@...bsd.de>
Subject: Re: Re: BUG: realloc(p,0) should be consistent with malloc(0)
Hi Sam,
On Sat, Jun 21, 2025 at 04:57:32AM +0100, Sam James wrote:
> Alejandro Colomar <alx@...nel.org> writes:
>
> > [...]
> >
> > But the glibc maintainers mentioned that they're investigating about it
> > in distros, so I guess we'll eventually have the results of their
> > investigation.
> >
>
> To manage expectations: I haven't seen anyone say they're going to work
> on this. I recall Sid mentioning it *could* be done (not offering to do
> it) and Adhemerval made a similar remark, but I don't think anyone has
> said they're undertaking this work.
>
> If I've missed some other remark (very possible with the length of the
> thread!), let me know of course.
Adhemerval mentioned in
Message-ID: <14fd8d0b-d32d-421f-8262-9c7ff9b1a22b@...aro.org>
| So what I would expect to move this forwards will be to.
|
| 1. Reopen https://sourceware.org/bugzilla/show_bug.cgi?id=12547
|
| 2. Follow the suggestions laid out by Siddhesh [2]. The Distribution-wide
| verification seems already to be in progress, with some good results
| from gnulib realloc replacement and some work by you on checking some
| other projects (systemd for instance).
|
| 3. Prepare the patch to change it, along with the manual documentation,
| regression testcase, and the NEW entry.
|
| 4. Since we are near to 2.42 release, this change should be done once
| 2.43 starts to give some time to check potential issue with rolling
| distros like Fedora Rawhide.
Point 2 said there's some work checking other projects such as systemd,
although now I realize it probably refers to some inspection someone
already did last time and not something really new? Maybe I
misunderstood that.
On the other hand, I think I proved yesterday in the proposal that the
change could be done with full backwards compatibility and zero leaks
(in code that wasn't leaky before, that is). The only thing that's
needed is that a compiler diagnostic for constant expression 0s in
realloc(3) calls (and of course that we retain ENOMEM). See the
proposal I sent (alx-0029r1), which details how and why. So the whole
verification would be superfluous.
Have a lovely day!
Alex
--
<https://www.alejandro-colomar.es/>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.