FEX icon indicating copy to clipboard operation
FEX copied to clipboard

Incorrect stack adjustment for POP/PUSH FS/GS when prefixed with 0x66

Open simon902 opened this issue 7 months ago • 1 comments

The translation for the instructions pop FS, pop GS, push FS and push GS when preceded by the 0x66 operand-size override prefix is incorrect in 64 bit mode.

Expected Behavior: The 0x66 prefix should force a 16-bit operation: The CPU should push/pop exactly 2 bytes of data to/from the stack and adjust RSP by exactly 2.

Actual Behavior: The 0x66 prefix is ignored: FEX pushes/pops 8 bytes of data and adjusts RSP by 8.

simon902 avatar Apr 27 '26 13:04 simon902

ty! curious how you're finding these bugs? if you have something ai or fuzzing would be cool to see prompt etc :)

bylaws avatar Apr 27 '26 14:04 bylaws