14 valgrind regression tests are failing on Debian 9/x86_64
(all tests were succesful on Debian 8).
memcheck/tests/overlap tests fails because valgrind does not detect
anymore memcpy calls with overlapping arguments.
As far as I can see, this is because memcpy on avx+erms+... CPUs
is (with glibc 2.24) implemented by calling an optimised memmove
implementation:
(gdb) bt
#0 () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:210
#1 0x000055555555478e in main () at redirf.c:22
(gdb) list redirf.c:22
17 x[i] = 0;
18
19 }
20
21 memcpy(x+50, x, 20); // no overlap
22 memcpy(x+70, x, 10); // no overlap
23 return 0;
24 }
(gdb)
The redir mechanism of valgrind then redirects the memcpy calls to
its memmove vg_replace_mem.c, that does not detect overlap.
This somewhat sounds like the return of
https://bugs.kde.org/show_bug.cgi?id=275284
Is that failure also seen on other x86_64 glibc 2.24 or 2.25 systems ?
Is there any way to improve the redir mechanism to e.g. redirect at
the level of the call to
callq 0x555555554580 <memcpy@plt>
rather than redirecting later at the ifunc function that points to
__memmove_avx_unaligned_erms ?
Any other idea ?
Philippe
|