Closed hbowden closed 8 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 .
/usr/bin/grep
Here is the output of lldb.
Process 25905 stopped
thread #1: tid = 0xc978, 0x00000001002dc2d1 libdistorm3.dylib`decode_inst(ci=0x00007fff5fbd66e0, ps=0x00007fff5fbd6710, di=0x00007fff5fbee858) + 513 at decoder.c:174, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x100e9a000)
frame #0: 0x00000001002dc2d1 libdistorm3.dylib`decode_inst(ci=0x00007fff5fbd66e0, ps=0x00007fff5fbd6710, di=0x00007fff5fbee858) + 513 at decoder.c:174
171 ci->code++;
172 if (--ci->codeLen < 0) goto _Undecodable;
173 }
-> 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
Any news regarding this one?
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
thread #1: tid = 0xc978, 0x00000001002dc2d1 libdistorm3.dylib`decode_inst(ci=0x00007fff5fbd66e0, ps=0x00007fff5fbd6710, di=0x00007fff5fbee858) + 513 at decoder.c:174, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x100e9a000)
frame #0: 0x00000001002dc2d1 libdistorm3.dylib`decode_inst(ci=0x00007fff5fbd66e0, ps=0x00007fff5fbd6710, di=0x00007fff5fbee858) + 513 at decoder.c:174
171 ci->code++;
172 if (--ci->codeLen < 0) goto _Undecodable;
173 }
-> 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
supportOldIntr=1, result=0x00007fff5fbd6870, maxResultCount=1000, usedInstructionsCount=0x00007fff5fbd67ac) + 1327 at decoder.c:578