diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-07-12 10:19:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-12 10:19:34 +0200 |
| commit | 9ac830aef7a15edb499658474282b5889b955b1a (patch) | |
| tree | 2a99a32640b6df7c4b7eb3fe61297f9035326459 | |
| parent | c48a8ba7ed9110df962df94ab9db314b2873c6b2 (diff) | |
| parent | b65c5473f12786c1d1b9721737d5cabbccf84806 (diff) | |
| download | miasm-9ac830aef7a15edb499658474282b5889b955b1a.tar.gz miasm-9ac830aef7a15edb499658474282b5889b955b1a.zip | |
Merge pull request #796 from commial/fix/merge_block
Fix/merge block
| -rw-r--r-- | example/disasm/full.py | 4 | ||||
| -rw-r--r-- | miasm2/analysis/data_flow.py | 4 |
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) |