unicorn-engine / unicorn

Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
http://www.unicorn-engine.org
GNU General Public License v2.0
7.68k stars 1.35k forks source link

movsxd ignores page protection. #1881

Open pl1047 opened 1 year ago

pl1047 commented 1 year ago

title. can be read with UC_PROT_NONE without fault... (x64)

pl1047 commented 1 year ago

Never mind, it seems I've misunderstood something. Its not the specific instruction, it just seems that protection is not always evaluated if you change it?

EDIT: Mmm if I go: self.uc.mem_write(self.rip, bytes(self.uc.mem_read(self.rip, 1))) # Invaliate tb it works as expected. Maybe mem_protect() should invalidate tb? I dunno, close as you see fit hehe.