Detours icon indicating copy to clipboard operation
Detours copied to clipboard

Condition will always be false.

Open alf-p-steinbach opened this issue 5 years ago • 2 comments

https://github.com/microsoft/Detours/blob/404c153ff390cb14f1787c7feeb4908c6d79b0ab/src/disasm.cpp#L3344

alf-p-steinbach avatar Jan 06 '20 09:01 alf-p-steinbach

Thanks for the report, I'll take a look!

bgianfo avatar Aug 21 '20 01:08 bgianfo

Assuming that the comment

        // 1111100xx001xxxx1111xxxxxxxxxxxx : PLD, PLI

is accurate, the bit mask (0xFE70F000) is correct -- but the expected value should be 0xF810F000. I.e. the lowest byte of the upper 32bit should be zero. The comment shows that this byte is not relevant (xxxx) and thus it makes sense to mask it out -- but then we'd expect all zeroes in the result.

Maybe this is a small brain fault since a few lines below, a slightly different mask is used, 0xFE7FF000 and in that case, the expected value would indeed by 0xF81FF000.

I suspect a unit test for this disassembler bug should be straightforward.

frerich avatar Sep 03 '20 21:09 frerich