diff options
Diffstat (limited to 'miasm2/jitter/jitcore.py')
| -rw-r--r-- | miasm2/jitter/jitcore.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/miasm2/jitter/jitcore.py b/miasm2/jitter/jitcore.py index 74c438a7..6048d62e 100644 --- a/miasm2/jitter/jitcore.py +++ b/miasm2/jitter/jitcore.py @@ -95,6 +95,11 @@ class JitCore(object): if cur_bloc.lines: cur_bloc.ad_min = cur_bloc.lines[0].offset cur_bloc.ad_max = cur_bloc.lines[-1].offset + cur_bloc.lines[-1].l + else: + # 1 byte block for unknown mnemonic + cur_bloc.ad_min = cur_bloc.label.offset + cur_bloc.ad_max = cur_bloc.label.offset+1 + def add_bloc_to_mem_interval(self, vm, bloc): "Update vm to include bloc addresses in its memory range" @@ -148,10 +153,6 @@ class JitCore(object): if self.log_newbloc: print 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[cur_bloc.label] = cur_bloc |