Skip to content

Incorrect registers in x86_64 ret/retf #2822

@hainest

Description

@hainest

Work environment

Questions Answers
System Capstone runs on OS/arch/bits Ubuntu x86_64
Capstone module affected x86
Source of Capstone git clone
Version/git commit 8872be6

0xcb is decoded as X86_LRETL instead of X86_LRETQ.

./cstool -dar x64 cb
 0  cb                                               retf	
	ID: 351 (retf)
	Prefix:0x00 0x00 0x00 0x00 
	Opcode:0xcb 0x00 0x00 0x00 
	rex: 0x0
	addr_size: 8
	modrm: 0x0
	disp: 0x0
	sib: 0x0
	Registers read: esp ss
	Registers modified: esp eip cs
	Groups: ret not64bitmode

The read set should be [rsp, ss] and the write set [rsp, rip, ss].

See #2789 for details. This can wait until a decision has been made about a new x86 backend (cf. #2505).

Metadata

Metadata

Assignees

No one assigned

    Labels

    X86ArchbugSomething is not working as it should

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions