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

            Bug ID: 374596
           Summary: inconsistent RDTSCP support on x86_64
           Product: valgrind
           Version: 3.12.0
          Platform: RedHat RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: vex
          Assignee: jsew...@acm.org
          Reporter: bugzi...@dcopp.net
  Target Milestone: ---

Created attachment 103212
  --> https://bugs.kde.org/attachment.cgi?id=103212&action=edit
g++ source for testing RDTSCP support

The attached test program attempts to determine support for, and then use,
RDTSCP instruction. On CPU that does not support RDTSCP is correctly reports
that the instruction is not supported and does not execute it. Otherwise it
does, without error.

Under valgrind, on a CPU that does not support RDTSCP the opcode is reported as
unsupported even though the program never executes it:

vex amd64->IR: unhandled instruction bytes: 0xF 0x1 0xF9 0xBE 0xD8 0x9 0x40 0x0
0xBF 0x80

Strangely (due to VEX simulating a different CPU stepping) if we comment out
the code that executes RDTCSP, the program under valgrind then reports the
instruction as being supported.

Expected behavior: under valgrind on a CPU that does not support RDTSCP the
program should not crash. valgrind (vex) should simulate the instruction
successfully since it advertises support for it.

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

Reply via email to