about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--example/disasm/full.py4
-rw-r--r--miasm2/analysis/data_flow.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/example/disasm/full.py b/example/disasm/full.py
index 9e1c422d..5658c2c2 100644
--- a/example/disasm/full.py
+++ b/example/disasm/full.py
@@ -227,9 +227,9 @@ if args.gen_ir:
         open('graph_defuse.dot', 'w').write(DiGraphDefUse(reachings).dot())
 
     out = ircfg.dot()
-    open('graph_irflow.dot', 'w').write(out)
-    out = ircfg_a.dot()
     open('graph_irflow_raw.dot', 'w').write(out)
+    out = ircfg_a.dot()
+    open('graph_irflow.dot', 'w').write(out)
 
     if args.simplify > 1:
 
diff --git a/miasm2/analysis/data_flow.py b/miasm2/analysis/data_flow.py
index d0f2a0b1..62176bb1 100644
--- a/miasm2/analysis/data_flow.py
+++ b/miasm2/analysis/data_flow.py
@@ -476,7 +476,9 @@ def merge_blocks(ircfg, loc_key_entries):
             continue
 
         # Test head jmp only block
-        if son is not None and son not in loc_key_entries:
+        if (son is not None and
+            son not in loc_key_entries and
+            son in ircfg.blocks):
             # jmp only test done previously
             modified |= _remove_to_parent(ircfg, loc_key, son)
             todo.add(loc_key)