gdabah / distorm

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

examples/tests/test_distorm3.py seems to be broken #118

Closed AaronNGray closed 7 years ago

AaronNGray commented 7 years ago

https://github.com/gdabah/distorm/blob/master/examples/tests/test_distorm3.py is failing on most tests !

AaronNGray commented 7 years ago

All the failures are of the same format :-

======================================================================
ERROR: test_* (__main__.*)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_distorm3.py", line 564, in test_xmm32
    I32("pmovsxwq xmm5, [edi]").check_simple_deref(1, Regs.EDI, 32)
  File "test_distorm3.py", line 106, in check_simple_deref
    self.assertEqual(self.inst.operands[n].type, distorm3.OPERAND_MEMORY)
  File "/usr/lib/python2.7/unittest/case.py", line 512, in assertEqual
    assertion_func = self._getAssertEqualityFunc(first, second)
  File "/usr/lib/python2.7/unittest/case.py", line 493, in _getAssertEqualityFunc
    asserter = self._type_equality_funcs.get(type(first))
AttributeError: 'Inst' object has no attribute '_type_equality_funcs'
AaronNGray commented 7 years ago

I have verified this on Linux and am getting the same results on Python 2.7 as on Windows bash.

AaronNGray commented 7 years ago

Fix: https://github.com/gdabah/distorm/pull/119

gdabah commented 7 years ago

Thanks