Skip to content

repne bsf not supported past capstone 4.0.2 #2911

@ddash-ct

Description

@ddash-ct

Work environment

Questions Answers
System Capstone runs on OS/arch/bits Windows x86
Capstone module affected x86
Source of Capstone >4.0.2

Instruction bytes giving faulty results

0xf2,0x0f,0xbc,0xda

Expected results

It should be:

repne bsf ebx, edx

Steps to get the wrong result

with Python

CODE = b"\x0f\xa4\xd3\x57\xf2\x0f\xbc\xda\x69\xda\xbf\x86\x31\x30"

md = Cs(CS_ARCH_X86, CS_MODE_32)
md.detail = True
for insn in md.disasm(CODE, 0x1000):
  # Print the faulty disassembly

# Results in <CsInsn 0x0 [0fa4d357]: shld ebx, edx, 0x57>, then analysis silently fails. This disassembly worked in capstone==4.0.2

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

Drag and drop zip archives containing the Additional info here, don't use external services or link.
Screenshots can be directly dropped here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    X86ArchbugSomething is not working as it shouldoutdated-moduleIssue due to an outdated arch module

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions