hexrays-python
hexrays-python copied to clipboard
IDA crashes when cfuncptr_t.treeitems is indexed under certain condition
Code to reproduce crash:
hexrays.decompile(here()).treeitems[0]
Expected behaviour:
-
hexrays.decompile(here()).treeitems[0]
should return first item incfuncptr_t.treeitems
Workaround:
c = hexrays.decompile(here())
c.__deref__()
c.treeitems[0]
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.