Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions miasm/core/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,12 @@ def _compute_generic_dominators(head, reachable_cb, prev_cb, next_cb):
dominators[node] = set(nodes)

dominators[head] = set([head])
todo = set(nodes)
todo = set([n for n in next_cb(head)])

while todo:
node = todo.pop()

# Heads state must not be changed
# Head's state must not be changed
if node == head:
continue

Expand All @@ -446,6 +446,7 @@ def _compute_generic_dominators(head, reachable_cb, prev_cb, next_cb):
dominators[node] = new_dom
for succ in next_cb(node):
todo.add(succ)

return dominators

def compute_dominators(self, head):
Expand Down