[PATCH][BZ #16004] Check overlaps in memcpy_chk.
Ondřej Bílka
neleai@seznam.cz
Sat Oct 26 05:43:00 GMT 2013
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.
More information about the Libc-alpha
mailing list