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][BZ #16004] Check overlaps in memcpy_chk.


On Fri, Oct 25, 2013 at 02:26:40PM -0700, Roland McGrath wrote:
> > Hi, this adds a overlap check to memcpy. As these are not performance
> > critical I deleted ifuncs and we instead do jump to memcpy.
> 
> I don't think it's at all clear that _FORTIFY_SOURCE wrappers are not
> performance critical.  Lots of systems nowadays are compiling most of
> their stuff this way (e.g. Ubuntu and Gentoo the compiler does it by
> default; Fedora et al the package system builds do it by default).

A checked now strcpy is four times slower than normal one. This has much
bigger effect than few extra cycles from overlap checking.

Most of other *_chk functions are also slow but we did not measured how.


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