Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using dewolf in combination with dewolf-idioms crashes #117

Open
mm4rks opened this issue Sep 9, 2022 · 0 comments
Open

Using dewolf in combination with dewolf-idioms crashes #117

mm4rks opened this issue Sep 9, 2022 · 0 comments
Assignees
Labels
bug Something isn't working priority-high High priority issue

Comments

@mm4rks
Copy link
Collaborator

mm4rks commented Sep 9, 2022

What happened?

Traceback (most recent call last):
  File "/home/user/.binaryninja/plugins/dewolf/decompiler/util/widget.py", line 51, in run
    code = self.decompile_for_widget(self.binary_view, self.function)
  File "/home/user/.binaryninja/plugins/dewolf/decompiler/util/widget.py", line 67, in decompile_for_widget
    task = decompiler.decompile(function, options)
  File "/home/user/.binaryninja/plugins/dewolf/decompile.py", line 55, in decompile
    pipeline.run(task)
  File "/home/user/.binaryninja/plugins/dewolf/decompiler/pipeline/pipeline.py", line 97, in run
    instance.run(task)
  File "/home/user/.binaryninja/plugins/dewolf/decompiler/pipeline/preprocessing/compiler_idiom_handling.py", line 38, in run
    new_instruction = self._get_replacement_instruction(
  File "/home/user/.binaryninja/plugins/dewolf/decompiler/pipeline/preprocessing/compiler_idiom_handling.py", line 92, in _get_replacement_instruction
    return Assignment(instructions[last_index].destination, BinaryOperation(operation_type, [var, const]))
AttributeError: 'Branch' object has no attribute 'destination'

How to reproduce?

Having dewolf and dewolf-idioms installed (present in BN plugin folder).
Sample: dewolf-idioms/test_samples/division
Decompiling func4 among others leads to the crash AttributeError: 'Branch' object has no attribute 'destination'

Affected Binary Ninja Version(s)

3.1.3689-dev (Build ID de16312)

@mm4rks mm4rks added bug Something isn't working priority-high High priority issue labels Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-high High priority issue
Projects
None yet
Development

No branches or pull requests

2 participants