![]() |
|
Message-ID: <85504ab9-3fa8-4692-b304-f49058329858@zytor.com> Date: Sun, 29 Jun 2025 09:25:13 -0700 From: "H. Peter Anvin" <hpa@...or.com> To: Alejandro Colomar <alx@...nel.org>, libc-alpha@...rceware.org Cc: bug-gnulib@....org, musl@...ts.openwall.com, наб <nabijaczleweli@...ijaczleweli.xyz>, Douglas McIlroy <douglas.mcilroy@...tmouth.edu>, Paul Eggert <eggert@...ucla.edu>, Robert Seacord <rcseacord@...il.com>, Elliott Hughes <enh@...gle.com>, Bruno Haible <bruno@...sp.org>, JeanHeyd Meneide <phdofthehouse@...il.com>, Rich Felker <dalias@...c.org>, Adhemerval Zanella Netto <adhemerval.zanella@...aro.org>, Joseph Myers <josmyers@...hat.com>, Florian Weimer <fweimer@...hat.com>, Laurent Bercot <ska-dietlibc@...rnet.org>, Andreas Schwab <schwab@...e.de>, Thorsten Glaser <tg@...bsd.de>, Eric Blake <eblake@...hat.com>, Vincent Lefevre <vincent@...c17.net>, Mark Harris <mark.hsj@...il.com>, Collin Funk <collin.funk1@...il.com>, Wilco Dijkstra <Wilco.Dijkstra@....com>, DJ Delorie <dj@...hat.com>, Cristian Rodríguez <cristian@...riguez.im>, Siddhesh Poyarekar <siddhesh@...plt.org>, Sam James <sam@...too.org>, Mark Wielaard <mark@...mp.org>, "Maciej W. Rozycki" <macro@...hat.com>, Martin Uecker <ma.uecker@...il.com>, Christopher Bazley <chris.bazley.wg14@...il.com>, eskil@...ession.se, Daniel Krügler <daniel.kruegler@...glemail.com>, Kees Cook <keescook@...omium.org>, Valdis Klētnieks <valdis.kletnieks@...edu> Subject: Re: alx-0029r6 - Restore the traditional realloc(3) specification On 2025-06-27 07:01, Alejandro Colomar wrote: > Hi! > > Here's a new revision of the proposal, addressing some points raised by > Mark, plus clarifying that the paragraph about when size is zero refers > to the total size, as Florian was concerned that it might not be > symmetric. > I don't know if it would be useful, but proposing a new interface of the form: reallocp(&ptr, size) ... to separate the status return from the pointer might be a really good idea. This would hopefully eliminate users doing the "obvious": ptr = realloc(ptr, size) Not that this resolves anything in the short or even medium term, but perhaps can help avoid problems in the more distant time frame. It is also an interface which is mostly trivial to infill. -hpa
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.