https://bugs.kde.org/show_bug.cgi?id=506453

            Bug ID: 506453
           Summary: Incorrect behaviour with vex-chase-guest=yes (=
                    default)
    Classification: Developer tools
           Product: valgrind
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 182843
  --> https://bugs.kde.org/attachment.cgi?id=182843&action=edit
tarball with reproducer and patch

Attached is a tarball with a small reproducer and a patch condensed from a
larger application 
(https://bugs.kde.org/show_bug.cgi?id=506211) that uses VEX IR injection.
It does not behave correctly when run under valgrind.

To reproduce:

1) Copy files.tar to the top of valgrind source tree;  tar xf files.tar
2) patch -p1 < IRI-patch  
3) Rebuild with    make -k
   memcheck/tests/vbit-test will no longer compile but that's OK as
   we don't need it.
4) Compile the reproducer:
   gcc -IVEX/pub -Iinclude reproducer.c
5) Run it:
   ./vg-in-place ./a.out

This is the output (both on s390 and x86-64):

IR_INJECT opnd1 = 0
test
IR_INJECT opnd1 = 0
IR_INJECT opnd1 = 0
test
IR_INJECT opnd1 = 1

Trivial inspection of the reproducer shows that this is obviously incorrect.
Expected output should be:

test
IR_INJECT opnd1 = 0
test
IR_INJECT opnd1 = 1

Turns out that --vex-guest-chase=no  makes valgrind behave correctly.
Scary stuff....

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to