This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Set behavior of sprintf-like functions with overlapping source and destination


On Thu, 20 Dec 2018, Gabriel F. T. Gomes wrote:

> >Traditionally we didn't worry about breaking code like PughUtils.c's 
> >'sprintf(mess,"%s %d",mess,...)' under the principle that such code was 
> >already broken. Why depart from that tradition here?
> 
> I don't know how to answer that...  I'm sort of a rookie, and I wasn't
> here to witness past, similar changes and what was the fallout.  Maybe
> other people have better, backed opinions about it...

We have the example of x86_64 memcpy (where a GLIBC_2.14 version was added 
to avoid breaking old *binaries* expecting it to have memmove semantics, 
but in that case breaking *sources* expecting overlapping copies to work 
was considered fine).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]