|
From: Mike C. <ma...@mc...> - 2019-09-09 13:31:27
|
In glibc 5aad5f617892e75d91d4c8fb7594ff35b610c042 (first released in v2.28) a call to strncmp was added to dl-load.c:is_dst. This causes valgrind to complain about glibc's highly-optimised strncmp performing sixteen-byte reads on short strings in ld.so. Let's intercept strncmp in ld.so too so we use valgrind's simple version to avoid this problem. --- shared/vg_replace_strmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index 87a4bcc55..5c05644fe 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -648,6 +648,8 @@ static inline void my_exit ( int x ) STRNCMP(VG_Z_LIBC_SONAME, __GI_strncmp) STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse2) STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse42) + STRNCMP(VG_Z_LD_LINUX_SO_2, strncmp) + STRNCMP(VG_Z_LD_LINUX_X86_64_SO_2, strncmp) #elif defined(VGO_darwin) STRNCMP(VG_Z_LIBC_SONAME, strncmp) -- 2.20.1 |