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

[[email protected]:189] TypeError: unhashable type: 'dict' #426

Open
bugfinder-bot opened this issue Jul 31, 2024 · 2 comments · May be fixed by #427
Open

[[email protected]:189] TypeError: unhashable type: 'dict' #426

bugfinder-bot opened this issue Jul 31, 2024 · 2 comments · May be fixed by #427
Assignees
Labels
bug Something isn't working bugfinder

Comments

@bugfinder-bot
Copy link
Collaborator

What happened?

  File "/opt/dewolf/decompiler/util/bugfinder/bugfinder.py", line 201, in iter_function_reports
    task, code = self.decompile(function, task_options=options)
  File "/opt/dewolf/decompile.py", line 80, in decompile
    result = self.decompile_all([function_id], task_options)
  File "/opt/dewolf/decompile.py", line 65, in decompile_all
    pipeline.run(task)
  File "/opt/dewolf/decompiler/pipeline/pipeline.py", line 114, in run
    raise e
  File "/opt/dewolf/decompiler/pipeline/pipeline.py", line 107, in run
    instance.run(task)
  File "/opt/dewolf/decompiler/pipeline/dataflowanalysis/common_subexpression_elimination.py", line 317, in run
    ExistingSubexpressionReplacer(task.graph, task.graph.dominator_tree).replace(task.graph.root)
  File "/opt/dewolf/decompiler/pipeline/dataflowanalysis/common_subexpression_elimination.py", line 125, in replace
    new_keys_list.append(self._replacements_for(current_node))
  File "/opt/dewolf/decompiler/pipeline/dataflowanalysis/common_subexpression_elimination.py", line 140, in _replacements_for
    sorted_subexpressions = sorted({expr for expr in _subexpression_dfs(instruction)}, key=lambda x: x.complexity)
  File "/opt/dewolf/decompiler/pipeline/dataflowanalysis/common_subexpression_elimination.py", line 140, in <setcomp>
    sorted_subexpressions = sorted({expr for expr in _subexpression_dfs(instruction)}, key=lambda x: x.complexity)
  File "/opt/dewolf/decompiler/structures/pseudo/expressions.py", line 575, in __hash__
    return super().__hash__()
  File "/opt/dewolf/decompiler/structures/pseudo/expressions.py", line 189, in __hash__
    return hash((tuple(self.value) if isinstance(self.value, list) else self.value, self._type, self._pointee))
  File "/opt/dewolf/decompiler/structures/pseudo/expressions.py", line 189, in __hash__
    return hash((tuple(self.value) if isinstance(self.value, list) else self.value, self._type, self._pointee))

Error class [email protected]:189 contains 361 cases.

How to reproduce?

python decompile.py e64e89a99a6a74aca85c9813ca5ee98179c222eb31bbee0d558dbd2df1e1197a sub_404aa0 --debug

sample: e64e89a99a6a74aca85c9813ca5ee98179c222eb31bbee0d558dbd2df1e1197a
case: https://bugfinder.seclab-bonn.de/case/58176/
dewolf commit: 3ed0094
Binaryninja version: 3.5.4526

@bugfinder-bot bugfinder-bot added bug Something isn't working bugfinder labels Jul 31, 2024
@rihi rihi self-assigned this Jul 31, 2024
@rihi
Copy link
Collaborator

rihi commented Jul 31, 2024

/cib

Copy link
Contributor

github-actions bot added a commit that referenced this issue Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bugfinder
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants