Add more GC guards

This commit is contained in:
Takashi Kokubun 2023-03-01 23:15:51 -08:00
parent d7888e4626
commit 3034553e8d
Notes: git 2023-03-06 07:29:48 +00:00
3 changed files with 6 additions and 3 deletions

View file

@ -289,7 +289,7 @@ module RubyVM::MJIT
end
def mjit_blocks(iseq)
# Tolerate GC on any ISEQ
# Guard against ISEQ GC at random moments
if C.imemo_type(iseq) != C.imemo_iseq
return Hash.new { |h, k| h[k] = {} }
end