fkie-cad / dewolf

A research decompiler implemented as a Binary Ninja plugin.
GNU Lesser General Public License v2.1
171 stars 9 forks source link

[AttributeError@calls.py:77] AttributeError: 'MediumLevelILSyscallSsa' object has no attribute 'dest' #246

Closed mm4rks closed 1 year ago

mm4rks commented 1 year ago

What happened?

  File "/opt/dewolf/decompiler/util/bugfinder/bugfinder.py", line 164, in iter_function_reports
    task_result = self.decompile(function, options)
  File "/opt/dewolf/decompile.py", line 50, in decompile
    task = self._frontend.create_task(function, task_options)
  File "/opt/dewolf/decompiler/frontend/binaryninja/frontend.py", line 143, in create_task
    raise e
  File "/opt/dewolf/decompiler/frontend/binaryninja/frontend.py", line 130, in create_task
    cfg = self._extract_cfg(function.function, options)
  File "/opt/dewolf/decompiler/frontend/binaryninja/frontend.py", line 162, in _extract_cfg
    return parser.parse(function)
  File "/opt/dewolf/decompiler/frontend/binaryninja/parser.py", line 34, in parse
    index_to_BasicBlock[basic_block.index] = BasicBlock(basic_block.index, instructions=list(self._lift_instructions(basic_block)))
  File "/opt/dewolf/decompiler/frontend/binaryninja/parser.py", line 77, in _lift_instructions
    if lifted_instruction := self._lifter.lift(instruction):
  File "/opt/dewolf/decompiler/frontend/binaryninja/lifter.py", line 28, in lift
    if pseudo_expression := handler(expression, **kwargs):
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/calls.py", line 56, in lift_syscall
    meta_data={"param_names": self._lift_call_parameter_names(call)},
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/calls.py", line 77, in _lift_call_parameter_names
    clean_type_string_of_parameters = instruction.dest.expr_type.get_string_after_name().strip("()")

Error class AttributeError@calls.py:77 contains 23 cases.

How to reproduce?

python decompile.py 59b648fe4d90177007574445a2092cdba06f7a6a5a7b5fb9c8f4060070f765e0 sub_1c2 --debug

sample: 59b648fe4d90177007574445a2092cdba06f7a6a5a7b5fb9c8f4060070f765e0 dewolf commit: 5566666af0d3271618e758808fbc7be92be02e1d Binaryninja version: 3.4.4271

NeoQuix commented 1 year ago

\cib

NeoQuix commented 1 year ago

/cib

github-actions[bot] commented 1 year ago

Branch issue-246-_AttributeError_calls_py_77_AttributeError_MediumLevelILSyscallSsa_object_has_no_attribute_dest created!