capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
http://www.capstone-engine.org
7.51k stars 1.54k forks source link

x64 disassembler big endian bug #2339

Open trufae opened 5 months ago

trufae commented 5 months ago

When using capstone5 on a big endian machine i get different output for some instructions:

./cstool x64 8b3482
 0  8b 34 82                                         mov    esi, dword ptr [rdx + rax*0]

on little endian i get the correct output:

$ ./cstool x64 8b3482
 0  8b 34 82                                         mov    esi, dword ptr [rdx + rax*4]

i have verified the same bug happens on next and v5 branches