about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2017-05-24 16:41:52 +0200
committerAjax <commial@gmail.com>2017-05-24 16:41:52 +0200
commit355e42270711685c6118a7e1430913e1030fe0b0 (patch)
tree1d30bbcd32ab20c7df141d73469b88f01f6996b6
parente852d850d6d3a5e66fe6530c913274c61f9886c0 (diff)
downloadmiasm-355e42270711685c6118a7e1430913e1030fe0b0.tar.gz
miasm-355e42270711685c6118a7e1430913e1030fe0b0.zip
Ensure there is no multi-line basic block in the cache
If there was any, the callback may be called after the execution of
several instruction, instead of the expected one-by-one
-rw-r--r--miasm2/analysis/dse.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/miasm2/analysis/dse.py b/miasm2/analysis/dse.py
index 7fdc5035..56ed3292 100644
--- a/miasm2/analysis/dse.py
+++ b/miasm2/analysis/dse.py
@@ -185,6 +185,9 @@ class DSEEngine(object):
         self.jitter.jit.set_options(max_exec_per_call=1, jit_maxline=1)
         self.jitter.exec_cb = self.callback
 
+        # Clean jit cache to avoid multi-line basic blocks already jitted
+        self.jitter.jit.lbl2jitbloc.clear()
+
     def attach(self, emulator):
         """Attach the DSE to @emulator
         @emulator: jitload (or API equivalent) instance"""