Closed nbriggs closed 4 years ago
Just checked with clang 10 (only for compiling the test itself), same failure. BTW -- It doesn't happen with clang 10 on an Ubuntu 20.04 x86_64 system (using the freebsd_valgrind code of about May 5th). I'm afraid I have no understanding of the VEX library, so the best I can do is dump data that might help.
I don't know that much about VEX either. --vex-guest-chase=no seems to prevent the problem.
I wonder if it's reproducible in classic Valgrind and therefore reportable to someone who might know/care to fix the problem.
This just came up in the #valgrind-dev IRC channel. See https://bugs.kde.org/show_bug.cgi?id=422715 I will try the patch tonight.
I'm UTC-8, so I tried it this morning and it appears to fix it.
$ perl tests/vg_regtest memcheck/tests/origin6-fp.vgtest
origin6-fp: valgrind -q --track-origins=yes ./origin6-fp
*** origin6-fp failed (stderr) ***
== 1 test, 1 stderr failure, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/origin6-fp (stderr)
$ patch </tmp/libvex.patch
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/VEX/priv/guest_generic_bb_to_IR.c b/VEX/priv/guest_generic_bb_to_IR.c
|index 2f204c5b0..0cee970e4 100644
|--- a/VEX/priv/guest_generic_bb_to_IR.c
|+++ b/VEX/priv/guest_generic_bb_to_IR.c
--------------------------
Patching file VEX/priv/guest_generic_bb_to_IR.c using Plan A...
Hunk #1 succeeded at 425.
Hunk #2 succeeded at 451.
Hunk #3 succeeded at 508.
Hunk #4 succeeded at 521.
done
$ gmake >/tmp/gmake.out
Refresh index: 100% (6255/6255), done.
Makefile:1696: warning: ignoring prerequisites on suffix rule definition
$ perl tests/vg_regtest memcheck/tests/origin6-fp.vgtest
origin6-fp: valgrind -q --track-origins=yes ./origin6-fp
== 1 test, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
$
Presumably it'll get committed to the main valgrind git repo and flow into yours?
I expect so. Sounds like there will be a version Valgrind 16.1 released shortly mainly because of this issue.
The change for this just landed upstream. Will merge and closes this issue this evening.
Fix merged from upstream To https://github.com/paulfloyd/freebsd_valgrind.git 7331e2cff..cbfddc494 freebsd -> freebsd
If memcheck/tests/origin6-fp.c is compiled with clang (tested with 8, 9) with optimization (-O, -O2), FreeBSD 12.1-RELEASE-p4, i386 system, then valgrind fails with
Using optimization -O0 does not cause the internal failure.