http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59061
--- Comment #34 from Jakub Jelinek <jakub at gcc dot gnu.org> --- And what is the reason why you want to duplicate the library optimization (which for memset/memcpy etc. is highly optimized, in glibc these days depends on the CPUs through ifunc etc.)? I mean, for small sizes you probably don't care and then doing it inline is fine, for larger sizes I think the interceptor has dlsym (RTLD_NEXT, "memcpy") saved somewhere anyway, so why don't you call that function pointer for say copying/clearing of say more than 64 bytes? lsan doesn't even intercept memset (or does it?), thus is there a reason why it just can't call memset directly?