diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-09-24 19:18:50 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-10-03 19:24:21 +0200 |
| commit | b8aa87630d125151adf7cf6621d3fcb44b2d6107 (patch) | |
| tree | be678662a5d4b5014df7aa63055d04e65c424653 /example/ida/ctype_propagation.py | |
| parent | 962a93e30bccdbd8ef7c39b9e1cac0d16105b94d (diff) | |
| download | miasm-b8aa87630d125151adf7cf6621d3fcb44b2d6107.tar.gz miasm-b8aa87630d125151adf7cf6621d3fcb44b2d6107.zip | |
Ctypes: allow analysis on incomplete graphs
Diffstat (limited to 'example/ida/ctype_propagation.py')
| -rw-r--r-- | example/ida/ctype_propagation.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/example/ida/ctype_propagation.py b/example/ida/ctype_propagation.py index c18abbfd..76d4fa2d 100644 --- a/example/ida/ctype_propagation.py +++ b/example/ida/ctype_propagation.py @@ -253,9 +253,10 @@ def analyse_function(): if (lbl, state) in done: continue done.add((lbl, state)) - symbexec_engine = TypePropagationEngine(ir_arch, types_mngr, state) + if lbl not in ir_arch.blocks: + continue - assert lbl in ir_arch.blocks + symbexec_engine = TypePropagationEngine(ir_arch, types_mngr, state) addr = symbexec_engine.emul_ir_block(lbl) symbexec_engine.del_mem_above_stack(ir_arch.sp) @@ -266,6 +267,8 @@ def analyse_function(): symbexec_engine.get_state()) for lbl, state in states.iteritems(): + if lbl not in ir_arch.blocks: + continue symbexec_engine = CTypeEngineFixer(ir_arch, types_mngr, state, cst_propag_link) addr = symbexec_engine.emul_ir_block(lbl) symbexec_engine.del_mem_above_stack(ir_arch.sp) |