TypeError exception randomly triggered when disassembling unexistant symbols
epinna opened this issue · comments
As reported in the subject.
$ python3 reverse.py /bin/ls -x asd
error: symbol asd not found
error: Try with --sym to see all symbols.
error: If you have set the option --dump or --calls you need to set
error: the option -x (see --help).
Exception ignored in: <bound method Cs.__del__ of <capstone.Cs object at 0x7f48d81a8d68>>
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/capstone/__init__.py", line 696, in __del__
TypeError: 'NoneType' object is not callable
Another minor issue here: the --sym
option does not exists, you may intend --symbol
. Please note that the exception is randomly triggered (maybe 1 out of 5 executions). Let me know if can't reproduce it and need further information.
Yes I've already seen this exception. After an internal error I call sys.exit like here, I think Capstone try to exit properly and sometimes it triggers an exception. I haven't look for an issue yet.
Maybe by doing something like this ?
try:
sys.exit(1)
except:
pass
Thanks.
I don't know - maybe it's worth to create a script to reproduce it reliably and open an issue to capstone
Bug submitted on capstone #387
Fixed on capstone capstone-engine/capstone@3808eec
Thanks