Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mvmmsa56opb.fsf@suse.de>
Date: Wed, 18 Jun 2025 17:42:40 +0200
From: Andreas Schwab <schwab@...e.de>
To: Alejandro Colomar <alx@...nel.org>
Cc: enh <enh@...gle.com>,  Florian Weimer <fweimer@...hat.com>,
  musl@...ts.openwall.com,  Rich Felker <dalias@...c.org>,  Adhemerval
 Zanella Netto <adhemerval.zanella@...aro.org>,  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>
Subject: Re: BUG: realloc(p,0) should be consistent with malloc(0)

On Jun 17 2025, Alejandro Colomar wrote:

> RETURN VALUE
>
>         If size is 0,
>         ...
>         either:
>
>             -  A null pointer shall be returned
>                and, if ptr is not a null pointer,
>                errno shall be set to EINVAL.
>
>             -  A pointer to the allocated space shall be returned,
>                and the memory object pointed to by ptr shall be freed.
>                 ...
>

Note that all of this is marked obsolescent.

-- 
Andreas Schwab, SUSE Labs, schwab@...e.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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.