From 8c436da764b0616976c74c43fefd5494d3889ebb Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Wed, 23 Mar 2016 16:29:53 +0100 Subject: Depgraph: use has_loop algorithm to spot data flow loops; fix reg test --- miasm2/analysis/depgraph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'miasm2/analysis/depgraph.py') diff --git a/miasm2/analysis/depgraph.py b/miasm2/analysis/depgraph.py index aec159aa..b574e421 100644 --- a/miasm2/analysis/depgraph.py +++ b/miasm2/analysis/depgraph.py @@ -252,10 +252,10 @@ class DependencyResult(DependencyState): @property def has_loop(self): - """True if current dictionary has a loop""" + """True iff there is at least one data dependencies cycle (regarding + the associated depgraph)""" if self._has_loop is None: - self._has_loop = (len(self.relevant_labels) != - len(set(self.relevant_labels))) + self._has_loop = self.graph.has_loop() return self._has_loop def irblock_slice(self, irb): -- cgit 1.4.1