about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2019-03-25 08:17:08 +0100
committerserpilliere <serpilliere@droids-corp.org>2020-02-14 21:42:38 +0100
commit84eb94e9c72b67360ee3e1b8f1f089fe48fbacd8 (patch)
treeb2f4bd9b132a67d86c91bff9a681666b3b54d2fc
parentec5310e8de291ae7692ec8b0883258467180988d (diff)
downloadmiasm-84eb94e9c72b67360ee3e1b8f1f089fe48fbacd8.tar.gz
miasm-84eb94e9c72b67360ee3e1b8f1f089fe48fbacd8.zip
DataFlow: fix resolved phi sources
-rw-r--r--miasm/analysis/data_flow.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/miasm/analysis/data_flow.py b/miasm/analysis/data_flow.py
index 850d7fe0..e5aa2222 100644
--- a/miasm/analysis/data_flow.py
+++ b/miasm/analysis/data_flow.py
@@ -1676,6 +1676,10 @@ class DiGraphLivenessSSA(DiGraphLivenessIRA):
                 continue
             out = {}
             for sources in viewvalues(irblock[0]):
+                if not sources.is_op('Phi'):
+                    # Some phi sources may have already been resolved to an
+                    # expression
+                    continue
                 var_to_parents = get_phi_sources_parent_block(self, irblock.loc_key, sources.args)
                 for var, var_parents in viewitems(var_to_parents):
                     out.setdefault(var, set()).update(var_parents)