about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/jitter/jitcore.py5
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