[musl] Re: realloci(): A realloc() variant that works in-place

Paul Eggert eggert@cs.ucla.edu
Sun Nov 9 19:03:52 GMT 2025


On 2025-11-09 10:11, Rich Felker wrote:
> On Sun, Nov 09, 2025 at 06:38:25PM +0100, Alejandro Colomar wrote:

>> My point was that it's easier to consider the lifetime of P ends at
>> every realloc(3) call than to consider it to end only if Q!=P.
> 
> I agree with this.

? The lifetime of P does not necessarily end after Q=realloc(P,N), even 
in C23. So the situation is already more complicated than Alejandro's 
incorrect summary, and for good reason. And there should be nothing 
wrong with adjusting this part of the standard to better reflect how 
real-world implementations behave.


More information about the Libc-alpha mailing list