Check if outlined code block has enough space too

This commit is contained in:
Maxime Chevalier-Boisvert 2020-09-28 17:01:26 -04:00 committed by Alan Wu
parent e8c914c250
commit 2c866ce8f0

View File

@ -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);