[musl] Re: realloci(): A realloc() variant that works in-place
Paul Eggert
eggert@cs.ucla.edu
Mon Nov 10 02:47:54 GMT 2025
On 2025-11-09 17:20, Rich Felker wrote:
> The only way the lifetime of P does not end is if realloc returns a
> null pointer indicating failure.
Yes, and my point was that Alejandro's summary of the situation (which
you went along with) got this detail wrong. And once one gets this
detail right (which static analyzers of course can do), that discredits
the idea that static analyzers are so dumb that they can't handle
conditional results from functions like realloc. On the contrary, static
analyzers do that sort of thing routinely, and they could continue to do
so if the standard were changed slightly in the direction I proposed.
More information about the Libc-alpha
mailing list