Open GoogleCodeExporter opened 9 years ago
I looked into the issue and found the problem. I have attached a patch that
addresses the issue by making the use of a lock prefix when the destination is
a register return undecodeable. Also realized that a decode failure when a lock
prefix is present could be due to the instruction not being lockable (e.g. mov
eax, ebx) and the current code seems to discard all of the prefix if there is a
decode error. So if the lock prefix was present, discard all bytes up to and
including the lock prefix, but keep everything after and try to decode again.
There's probably a better way to do it other than what I've supplied.
for 64bit
48f093 should become DB 43; DB f0; xor eax, ebx
f04893 should become DB f0; xor rax, rbx
Original comment by mnor...@cerodias.com
on 17 Aug 2013 at 2:37
Attachments:
Hi
This is by design, it's an invalid prefix. I wanted to ignore such prefixes on
purpose so people can still see the instructions, maybe invalid instruction is
too much.
Anyway, if you use the decompose interface, there's the unusedPrefixesMask you
can examine for such cases.
Original comment by distorm@gmail.com
on 27 Aug 2013 at 6:27
Original issue reported on code.google.com by
mnor...@cerodias.com
on 15 Aug 2013 at 2:31