gdabah / distorm

Powerful Disassembler Library For x86/AMD64
Other
1.26k stars 238 forks source link

distorm crashes while dissembling /usr/bin/grep on Mac OSX 10.10.3 #87

Closed hbowden closed 8 years ago

hbowden commented 9 years ago

I tried using distorm to dissemble /usr/bin/grep on Mac OSX 10.10.3 and distorm crashes on line 174 of decoder.c .

Here is the output of lldb.

Process 25905 stopped

-> 174 modrm = *ci->code;

175

176 /* Some instructions enforce that reg=000, so validate that. (Specifically EXTRQ). */

177 if ((instFlags & INST_FORCE_REG0) && (((modrm >> 3) & 7) != 0)) goto

_Undecodable;

(lldb) thread backtrace

thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x100e9a000)

ps=0x00007fff5fbd6710, di=0x00007fff5fbee858) + 513 at decoder.c:174

frame #1: 0x00000001002dbbbf libdistorm3.dylib`decode_internal(_ci=0x00007fff5fbd67b0, 

supportOldIntr=1, result=0x00007fff5fbd6870, maxResultCount=1000, usedInstructionsCount=0x00007fff5fbd67ac) + 1327 at decoder.c:578

frame #2: 0x00000001002db5b0 libdistorm3.dylib`distorm_decode64 + 176

frame #3: 0x0000000100000df9 nextgen`disas_executable(path=<unavailable>) + 281 at disas.c:76

frame #4: 0x0000000100001698 nextgen`setup_runtime + 88 at runtime.c:53

frame #5: 0x0000000100000bca nextgen`main(argc=<unavailable>, argv=<unavailable>) + 394 at nextgen.c:122

frame #6: 0x00007fff8f4c45c9 libdyld.dylib`start + 1

frame #7: 0x00007fff8f4c45c9 libdyld.dylib`start + 1
gdabah commented 9 years ago

Any news regarding this one?