Summary: | bt, btc, btr and bts instruction improperly translated by VEX on x86-64 | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | lmrs2 |
Component: | vex | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED NOT A BUG | ||
Severity: | major | CC: | ivosh |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
lmrs2
2016-02-18 10:24:57 UTC
What you're seeing is the result of a kludge, in which btq for a register operand is implemented by pushing the argument on the (guest) stack temporarily, and then executing the same IR as for btq with a memory operand. Have a look at the relevant bits of guest_amd64_toIR.c. I'm sure it's documented there. Honestly .. do you think any large program would actually run properly on Valgrind if these instructions had really been misimplemented? Thx for your reply. The implementation surely works, but the workaround adds side effects that the original program would not have, eg when doing taint tracking -- which is what we were doing... |