angr / simuvex

[DEPRECATED] A symbolic execution engine for the VEX IR
BSD 2-Clause "Simplified" License
79 stars 57 forks source link

unsatisfiable conditional #66

Closed schieb closed 7 years ago

schieb commented 7 years ago

x mod 1 is always 0. Perhaps you meant addr % 4 == 2 as a quick check in case the caller forgot to specify the thumb argument (which would catch a mistake half the time). If that is the case, I think a warning would be in order. Code is here.

thumb = int(thumb)
if isinstance(arch, ArchARM):
    if addr % 1 == 1:
        thumb = 1
    if thumb:
        addr &= ~1

I could be completely wrong. I have zero arm experience, which is why I did not submit a PR.

rhelmot commented 7 years ago

Yikes, sorry about that. should have been addr % 2 == 1. Odd addresses in VEX's emulation of ARM indicate executing in thumb mode.