diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2014-09-05 15:44:31 +0200 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2014-09-05 15:44:31 +0200 |
| commit | c3463980ca9a3ac261cc52f9191a86811159d3c7 (patch) | |
| tree | 86c7deeded85f8583bb6467f42765f559e10ea95 /miasm2/jitter/jitcore.py | |
| parent | 60f793133e93e88e6c3c1d475e403c9542bc2e32 (diff) | |
| download | miasm-c3463980ca9a3ac261cc52f9191a86811159d3c7.tar.gz miasm-c3463980ca9a3ac261cc52f9191a86811159d3c7.zip | |
Jitcore: check for empty blocks
Diffstat (limited to '')
| -rw-r--r-- | miasm2/jitter/jitcore.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/miasm2/jitter/jitcore.py b/miasm2/jitter/jitcore.py index 1af7333f..8bf42390 100644 --- a/miasm2/jitter/jitcore.py +++ b/miasm2/jitter/jitcore.py @@ -131,6 +131,11 @@ class JitCore(object): print cur_bloc if self.disasm_cb is not None: self.disasm_cb(cur_bloc) + + # Check for empty blocks + if not cur_bloc.lines: + raise ValueError("Cannot JIT a block without any assembly line") + # Update label -> bloc self.lbl2bloc[l] = cur_bloc |