Skip to content

Fix for x86_op record for ocaml bindings#1539

Merged
aquynh merged 1 commit intocapstone-engine:masterfrom
ctk21:bugfix/ctk21/ocaml_bindings_x86_op_record_fix
Sep 26, 2019
Merged

Fix for x86_op record for ocaml bindings#1539
aquynh merged 1 commit intocapstone-engine:masterfrom
ctk21:bugfix/ctk21/ocaml_bindings_x86_op_record_fix

Conversation

@ctk21
Copy link
Copy Markdown
Contributor

@ctk21 ctk21 commented Sep 26, 2019

This PR fixes a bug with the x86_op record in the ocaml bindings.

Before the change fields such as size where returned with bad values, for example:

Platform: X86 64 (Intel syntax)
0x1000	push	rbp
	Prefix:
	Opcode: 0x55
	addr_size: 8
	modrm: 0x0
	sib: 0x0
	op_count: 1
		op[0]: REG = rbp  [sz=2944]

After the change the fields are correctly returned to ocaml:

Platform: X86 64 (Intel syntax)
0x1000	push	rbp
	Prefix:
	Opcode: 0x55
	addr_size: 8
	modrm: 0x0
	sib: 0x0
	op_count: 1
		op[0]: REG = rbp  [sz=8]

@aquynh aquynh merged commit 418d36d into capstone-engine:master Sep 26, 2019
@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented Sep 26, 2019

merged, thanks!

i also cherry-picked this for "v4" & "next" branches, please confirm they all work well.

do you mind looking at non-x86 arches? i think they need update, too.

@ctk21
Copy link
Copy Markdown
Contributor Author

ctk21 commented Sep 30, 2019

do you mind looking at non-x86 arches? i think they need update, too.

Took a look at the non-x86 arches, the code for them looked fine already!

@riptl riptl mentioned this pull request Jul 22, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants