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.33k stars 1.31k forks source link

When running x86 simulation in unrestricted mode, there's an EFLAGS error upon exiting #1938

Open IntThree opened 2 months ago

IntThree commented 2 months ago

Executing this code: uc_emu_start(lpCip, -1, NULL, 0);

When running to int 3, the EFLAGS are being altered to an incorrect value.

Please check the code.

IntThree commented 2 months ago

00007ff66a36ebc5 inc r11b w:[rflags = 287]
00007ff66a36ebc8 jnp 0x7ff66a31a599 r:[rflags = a93]

IntThree commented 2 months ago

ERROR: shl al, cl al == 1 cl == 7

EFLAGS ERROR!!!! al = 80 eflags = A80

wtdcode commented 2 months ago

1933