Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xed_operand_values_has_modrm_byte returns wrong field #65

Closed
OZ1 opened this issue Aug 25, 2017 · 5 comments
Closed

xed_operand_values_has_modrm_byte returns wrong field #65

OZ1 opened this issue Aug 25, 2017 · 5 comments

Comments

@OZ1
Copy link

OZ1 commented Aug 25, 2017

consider the following instruction
48 2B E0 sub rsp, rax
it has REX=48, opcode=2B and modrm=E0 bytes

xed_decoded_inst_s::has_modrm = 1
xed_decoded_inst_s::modrm_byte = E0
xed_decoded_inst_s::modrm = 0

along with has_modrm and modrm_byte fields the structure has modrm field which is not filled in

xed_operand_values_has_modrm_byte which (according to its name) is supposed to return has_modrm=1 field, but returns modrm=0 field instead

FIX should be in change of line 237 in xed-operand-values-interface.c from
return xed3_operand_get_modrm(p);
to
return xed3_operand_get_has_modrm(p);

what is the meaning of field modrm? maybe it should be deleted or deprcated if not used?

@markcharney
Copy link
Contributor

yep. thx. fixing this now.

@markcharney
Copy link
Contributor

I just pushed a branch mjc/2017-08-28 that has what I believe is a fix for this issue. when testing finishes, I'll merge it to master. Thanks again for the bug report. I had to clean up some older stuff.

@markcharney
Copy link
Contributor

pushed. Let me know if this improves things for you. Thanks.

@OZ1
Copy link
Author

OZ1 commented Aug 29, 2017

thx

@markcharney
Copy link
Contributor

Ok then. I'll close this one.

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

No branches or pull requests

2 participants