fkie-cad / dewolf

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

[AttributeError@variabledeclarations.py:72] AttributeError: 'BinaryOperation' object has no attribute 'name' #359

Closed bugfinder-bot closed 5 months ago

bugfinder-bot commented 7 months ago

What happened?


  File "/opt/dewolf/decompiler/util/bugfinder/bugfinder.py", line 201, in iter_function_reports
    task_result = self.decompile(function, options)
  File "/opt/dewolf/decompile.py", line 52, in decompile
    task.code = self._backend.generate([task])
  File "/opt/dewolf/decompiler/backend/codegenerator.py", line 34, in generate
    string_blocks.append(self.generate_function(task))
  File "/opt/dewolf/decompiler/backend/codegenerator.py", line 45, in generate_function
    local_declarations=LocalDeclarationGenerator.from_task(task) if not task.failed else "",
  File "/opt/dewolf/decompiler/backend/variabledeclarations.py", line 41, in from_task
    return "\n".join(generator.generate(param_names))
  File "/opt/dewolf/decompiler/backend/variabledeclarations.py", line 72, in generate
    if not isinstance(variable, GlobalVariable) and variable.name not in param_names:

Error class AttributeError@variabledeclarations.py:72 contains 55 cases.

How to reproduce?

python decompile.py a38d98cf9dde696e5556b3c6bb2d1eaaaf558db1d439b0c981653d035dffa45f select --debug

sample: a38d98cf9dde696e5556b3c6bb2d1eaaaf558db1d439b0c981653d035dffa45f case: https://bugfinder.seclab-bonn.de/case/9012/ dewolf commit: 0ff5502b Binaryninja version: 3.5.4526

rihi commented 7 months ago

/cib

github-actions[bot] commented 7 months ago

Branch issue-359-_AttributeError_variabledeclarations_py_72_AttributeError_BinaryOperation_object_has_no_attribute_name created!