summaryrefslogtreecommitdiffstats
path: root/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 48dabd6..8015202 100644
--- a/exec.c
+++ b/exec.c
@@ -367,6 +367,9 @@ void tb_flush(CPUState *env1)
nb_tbs, nb_tbs > 0 ?
((unsigned long)(code_gen_ptr - code_gen_buffer)) / nb_tbs : 0);
#endif
+ if ((unsigned long)(code_gen_ptr - code_gen_buffer) > CODE_GEN_BUFFER_SIZE)
+ cpu_abort(env1, "Internal error: code buffer overflow\n");
+
nb_tbs = 0;
for(env = first_cpu; env != NULL; env = env->next_cpu) {
OpenPOWER on IntegriCloud