From 0329ab2021727242f31adfd665f602a8a6163aa8 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Tue, 7 Oct 2025 12:39:38 +0000 Subject: [PATCH] Document that --vex-guest-chase=not ought to be used when doing IR injection. Fixes https://bugs.kde.org/show_bug.cgi?id=506453 --- NEWS | 1 + VEX/priv/ir_inject.c | 4 ++++ memcheck/tests/vbit-test/vbit-test-sec.vgtest | 2 +- memcheck/tests/vbit-test/vbit-test.vgtest | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index bdf175eac8..7335f05b33 100644 --- a/NEWS +++ b/NEWS @@ -987,6 +987,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 451843 valgrind fails to start on a FreeBSD system which enforces W^X 495483 Control building documentation via BUILD_DOCS 506211 Constant folding improvements +506453 Unexpected behaviour with IR injection and vex-guest-chase=yes 509157 riscv64: Shift instructions can behave wrong To see details of a given bug, visit diff --git a/VEX/priv/ir_inject.c b/VEX/priv/ir_inject.c index 04228538f1..b447f6e946 100644 --- a/VEX/priv/ir_inject.c +++ b/VEX/priv/ir_inject.c @@ -27,6 +27,10 @@ The GNU General Public License is contained in the file COPYING. */ +/* !!! When running valgrind on applications that use IR injection + !!! --vex-guest-chase=no should be given on the command line. This + !!! avoids that vex_inject_ir is called speculatively. +*/ #include "libvex_basictypes.h" #include "libvex_ir.h" #include "libvex.h" diff --git a/memcheck/tests/vbit-test/vbit-test-sec.vgtest b/memcheck/tests/vbit-test/vbit-test-sec.vgtest index 2d3c9389da..8d84e7e90b 100644 --- a/memcheck/tests/vbit-test/vbit-test-sec.vgtest +++ b/memcheck/tests/vbit-test/vbit-test-sec.vgtest @@ -1,3 +1,3 @@ prog: vbit-test-sec prereq: test -x vbit-test-sec -vgopts: -q --expensive-definedness-checks=yes +vgopts: -q --expensive-definedness-checks=yes --vex-guest-chase=no diff --git a/memcheck/tests/vbit-test/vbit-test.vgtest b/memcheck/tests/vbit-test/vbit-test.vgtest index a05890566b..198c62351c 100644 --- a/memcheck/tests/vbit-test/vbit-test.vgtest +++ b/memcheck/tests/vbit-test/vbit-test.vgtest @@ -1,2 +1,2 @@ prog: vbit-test -vgopts: -q --expensive-definedness-checks=yes +vgopts: -q --expensive-definedness-checks=yes --vex-guest-chase=no -- 2.47.3