On Mon, 16 Jun 2025, Alejandro Colomar wrote:

> Since glibc and Bionic are the two implementations that are currently
> broken, could you please fix your implementations?  I'm sure the
> C Committee will be much easier to convince if the implentations have
> changed in a clear direction.
> 
> But if the committee says we're not fixing ISO C until the
> implementations are fixed, and the implementations (you) refuse to
> accept the fix until the committee standardizes something, then we'll
> have the problem forever.

I think a better way to eliminate UB here would be to require this 
erroneous case to terminate execution.  The sequence of changes to 
semantics in past standard versions means that it's always a bad idea for 
applications to try to use realloc with size 0 and preventing them more 
strongly from doing so seems better to me than defining semantics that an 
application might then be able to use in 10-15 years' time.

-- 
Joseph S. Myers
josmy...@redhat.com


Reply via email to