ruby-changes:68606
From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:10:37 +0900 (JST)
Subject: [ruby-changes:68606] 2c866ce8f0 (master): Check if outlined code block has enough space too
https://git.ruby-lang.org/ruby.git/commit/?id=2c866ce8f0 From 2c866ce8f0ff45e8d6d2941df174a2effe12a2dc Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...> Date: Mon, 28 Sep 2020 17:01:26 -0400 Subject: Check if outlined code block has enough space too --- ujit_compile.c | 4 ++++ 1 file changed, 4 insertions(+) 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 https://github.com/ruby/ruby/blob/trunk/ujit_compile.c#L193 { 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); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/