EiNSTeiN- / hexrays-python

Python bindings for the Hexrays Decompiler
Other
87 stars 24 forks source link

IDA crashes when cfuncptr_t.treeitems is indexed under certain condition #2

Open nan0tube opened 11 years ago

nan0tube commented 11 years ago

Code to reproduce crash:

hexrays.decompile(here()).treeitems[0]

Expected behaviour:

Workaround:

c = hexrays.decompile(here())
c.__deref__()
c.treeitems[0]
EiNSTeiN- commented 11 years ago

If you are going to hold copies of the ctree objects or a copy of the cfunc, you should increment the reference counter cfuncptr_t.refcnt.