Skip to content

Commit 280a710

Browse files
authored
Merge pull request #2170 from crytic/dev-fix
Fix CI
2 parents dab60e0 + 73f2dc6 commit 280a710

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

slither/core/dominators/utils.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,21 @@
99
def intersection_predecessor(node: "Node") -> Set["Node"]:
1010
if not node.fathers:
1111
return set()
12-
if not any(father.is_reachable for father in node.fathers):
13-
return set()
14-
15-
ret = set()
16-
for pred in node.fathers:
17-
ret = ret.union(pred.dominators)
1812

19-
for pred in node.fathers:
20-
if pred.is_reachable:
21-
ret = ret.intersection(pred.dominators)
13+
# Revert PR1984
14+
ret = node.fathers[0].dominators
15+
for pred in node.fathers[1:]:
16+
ret = ret.intersection(pred.dominators)
17+
# if not any(father.is_reachable for father in node.fathers):
18+
# return set()
19+
#
20+
# ret = set()
21+
# for pred in node.fathers:
22+
# ret = ret.union(pred.dominators)
23+
#
24+
# for pred in node.fathers:
25+
# if pred.is_reachable:
26+
# ret = ret.intersection(pred.dominators)
2227
return ret
2328

2429

@@ -91,8 +96,9 @@ def compute_dominance_frontier(nodes: List["Node"]) -> None:
9196
for node in nodes:
9297
if len(node.fathers) >= 2:
9398
for father in node.fathers:
94-
if not father.is_reachable:
95-
continue
99+
# Revert PR1984
100+
# if not father.is_reachable:
101+
# continue
96102
runner = father
97103
# Corner case: if there is a if without else
98104
# we need to add update the conditional node

0 commit comments

Comments
 (0)