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

Incorrect reg_access in some AArch64 instructions #2385

Open
Kashio opened this issue Jun 8, 2024 · 0 comments
Open

Incorrect reg_access in some AArch64 instructions #2385

Kashio opened this issue Jun 8, 2024 · 0 comments
Labels
Milestone

Comments

@Kashio
Copy link

Kashio commented Jun 8, 2024

Work environment

Questions Answers
OS/arch/bits Windows x64
Architecture armv8.
Source of Capstone git clone, brew, pip, release binaries etc.
Version/git commit v5.0.1

Instruction bytes giving faulty results

0x1f, 0x00, 0x01, 0xeb

Expected results

It should be:

([219], [4])

Steps to get the wrong result

With Python

CODE = b"\x1f\x00\x01\xeb"

md = Cs(CS_ARCH_ARM64, CS_MODE_ARM)
md.detail = True
for insn in md.disasm(CODE, 0x1000):
  inst.regs_access() # Prints ([219], [4, 218])

Additional Logs, screenshots, source code, configuration dump, ...

As far as I know and looking a the pseudo code for the instruction, the first source operand here x0 shouldn't be modified and reg_access reports it as being written to. I see this behaviour with more instructions like cmn etc..

@Rot127 Rot127 added this to the v5.0.2 milestone Jun 9, 2024
@Rot127 Rot127 added bug ARM Arch labels Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants