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

[TypeError@ast_nodes.py:283] TypeError: 'NoneType' object is not iterable #337

Open bugfinder-bot opened 9 months ago

bugfinder-bot commented 9 months ago

What happened?


  File "/opt/dewolf/decompiler/util/bugfinder/bugfinder.py", line 190, in iter_function_reports
    task_result = self.decompile(function, options)
  File "/opt/dewolf/decompile.py", line 51, in decompile
    pipeline.run(task)
  File "/opt/dewolf/decompiler/pipeline/pipeline.py", line 109, in run
    raise e
  File "/opt/dewolf/decompiler/pipeline/pipeline.py", line 102, in run
    instance.run(task)
  File "/opt/dewolf/decompiler/pipeline/controlflowanalysis/restructuring.py", line 50, in run
    self.restructure_cfg()
  File "/opt/dewolf/decompiler/pipeline/controlflowanalysis/restructuring.py", line 86, in restructure_cfg
    AcyclicRegionRestructurer(self.t_cfg, self.asforest, self.options).restructure()
  File "/opt/dewolf/decompiler/pipeline/controlflowanalysis/restructuring_commons/acyclic_restructuring.py", line 46, in restructure
    self._construct_ast_for_region(restructurable_region, node)
  File "/opt/dewolf/decompiler/pipeline/controlflowanalysis/restructuring_commons/acyclic_restructuring.py", line 71, in _construct_ast_for_region
    restructured_region_root = self._construct_refined_ast(seq_node)
  File "/opt/dewolf/decompiler/pipeline/controlflowanalysis/restructuring_commons/acyclic_restructuring.py", line 94, in _construct_refined_ast
    ConditionBasedRefinement.refine(self.asforest)
  File "/opt/dewolf/decompiler/pipeline/controlflowanalysis/restructuring_commons/condition_based_refinement.py", line 35, in refine
    if_refinement._condition_based_refinement()
  File "/opt/dewolf/decompiler/pipeline/controlflowanalysis/restructuring_commons/condition_based_refinement.py", line 51, in _condition_based_refinement
    newly_added_sequence_nodes = self._structure_sequence_node(seq_node)
  File "/opt/dewolf/decompiler/pipeline/controlflowanalysis/restructuring_commons/condition_based_refinement.py", line 95, in _structure_sequence_node
    for child in list(sequence_node.children):
  File "/opt/dewolf/decompiler/structures/ast/ast_nodes.py", line 283, in children
    if set(self._sorted_children) != set(children):

Error class TypeError@ast_nodes.py:283 contains 45 cases.

How to reproduce?

python decompile.py 9a3901b4bbff5d180dc3e7920cd76a7055e282eec749bf365e8fe97293df2a38 iniObjectNext --debug

sample: 9a3901b4bbff5d180dc3e7920cd76a7055e282eec749bf365e8fe97293df2a38 case: https://bugfinder.seclab-bonn.de/case/4429/ dewolf commit: 8e40c130 Binaryninja version: 3.4.4271

mm4rks commented 9 months ago

duplicate https://github.com/fkie-cad/dewolf/issues/213

mm4rks commented 9 months ago

restructuring

mm4rks commented 9 months ago

/cib

github-actions[bot] commented 9 months ago

Branch issue-337-_TypeError_ast_nodes_py_283_TypeError_NoneType_object_is_not_iterable created!