summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ujit_compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ujit_compile.c b/ujit_compile.c
index 9097d78b8a..1fcbda1ef3 100644
--- a/ujit_compile.c
+++ b/ujit_compile.c
@@ -193,6 +193,10 @@ ujit_compile_insn(rb_iseq_t *iseq, unsigned int insn_idx, unsigned int* next_uji
{
rb_bug("out of executable memory");
}
+ if (ocb->write_pos + 1024 >= ocb->mem_size)
+ {
+ rb_bug("out of executable memory (outlined block)");
+ }
// Align the current write positon to cache line boundaries
cb_align_pos(cb, 64);