howardjack / distorm

Automatically exported from code.google.com/p/distorm
GNU General Public License v3.0
0 stars 0 forks source link

Decompose Generator Regression in distorm3.3 #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using the DecomposeGenerator across the following code, the second 
instruction's decomposition data is corrupted and causes a crash if you attempt 
to stringify it:

  4008e0:       48 83 f8 00             cmp    $0x0,%rax
  4008e4:       72 06                   jb     4008ec <true>

The crash:

  File "/usr/local/lib/python2.7/site-packages/distorm3/__init__.py", line 830, in __str__
    return self._toText()
  File "/usr/local/lib/python2.7/site-packages/distorm3/__init__.py", line 827, in _toText
    return Decode(self.address, self.instructionBytes, self.dt)[0][2]
IndexError: list index out of range

A test case is attached. I am running distrom3.3 on OpenBSD/amd64 with 
Python-2.7.

Cheers

Original issue reported on code.google.com by vex...@gmail.com on 8 Aug 2012 at 10:10

Attachments:

GoogleCodeExporter commented 9 years ago
I am aware of this problem. Thanks.

Original comment by distorm@gmail.com on 8 Aug 2012 at 5:05

GoogleCodeExporter commented 9 years ago
Any news on this?

Original comment by vex...@gmail.com on 2 Sep 2012 at 6:38

GoogleCodeExporter commented 9 years ago
The _DInst structure in the C code and the Python code weren't synchronized, 
again from the SVN commit problem I had ;(

Original comment by distorm@gmail.com on 20 Sep 2012 at 11:21