hexrays-python icon indicating copy to clipboard operation
hexrays-python copied to clipboard

IDA crashes when cfuncptr_t.treeitems is indexed under certain condition

Open nan0tube opened this issue 11 years ago • 1 comments

Code to reproduce crash:

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

Expected behaviour:

  • hexrays.decompile(here()).treeitems[0] should return first item in cfuncptr_t.treeitems

Workaround:

c = hexrays.decompile(here())
c.__deref__()
c.treeitems[0]

nan0tube avatar Jul 12 '13 08:07 nan0tube

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.

EiNSTeiN- avatar Jul 12 '13 12:07 EiNSTeiN-