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

[AArch64] Missing ACCESS mode in memory operand in instruction ldur #2572

Closed
Mar3yZhang opened this issue Dec 6, 2024 · 0 comments · Fixed by #2574
Closed

[AArch64] Missing ACCESS mode in memory operand in instruction ldur #2572

Mar3yZhang opened this issue Dec 6, 2024 · 0 comments · Fixed by #2574
Labels
AArch64 Arch bug Something is not working as it should

Comments

@Mar3yZhang
Copy link

Mar3yZhang commented Dec 6, 2024

Work environment

Questions Answers
OS/arch/bits x86_64 Ubuntu 20.04
Architecture AArch64
Source of Capstone git clone, default on next branch.
Version/git commit v6.0.0, e46838

Instruction bytes giving faulty results

0x00 0x10 0x40 0xb8

Expected results

It should be:

$ ./cstool -d aarch64 001040b8
 0  00 10 40 b8  ldur   w0, [x0, #1]
        ID: 697 (ldur)
        op_count: 2
                operands[0].type: REG = w0
                operands[0].access: WRITE
                operands[1].type: MEM
                        operands[1].mem.base: REG = x0
                        operands[1].mem.disp: 0x1
*****           operands[1].access: READ          ***** MISSING LINE *****
        Registers read: x0
        Registers modified: w0

Steps to get the wrong result

With cstool:

$ ./cstool -d aarch64 001040b8
 0  00 10 40 b8  ldur   w0, [x0, #1]
        ID: 697 (ldur)
        op_count: 2
                operands[0].type: REG = w0
                operands[0].access: WRITE
                operands[1].type: MEM
                        operands[1].mem.base: REG = x0
                        operands[1].mem.disp: 0x1
        Registers read: x0
        Registers modified: w0

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

I'm not sure this is considered an error after the upgrade. But I think the memory operand should have an access field READ as illustrated.

@Mar3yZhang Mar3yZhang changed the title [AArch64] Missing one memory access field in instruction ldur [AArch64] Missing ACCESS mode in memory operand in instruction ldur Dec 6, 2024
@Mar3yZhang Mar3yZhang changed the title [AArch64] Missing ACCESS mode in memory operand in instruction ldur [AArch64] Missing ACCESS mode in memory operand in instruction ldur Dec 6, 2024
@Rot127 Rot127 added bug Something is not working as it should AArch64 Arch labels Dec 6, 2024
@Rot127 Rot127 mentioned this issue Dec 6, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AArch64 Arch bug Something is not working as it should
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants