1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Assert unit->iseq null out happens under the JIT/GC guard

This commit is contained in:
Takashi Kokubun 2020-12-03 00:01:10 -08:00
parent 58c3c75fee
commit 541e4340dd
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

2
mjit.c
View file

@ -119,6 +119,8 @@ mjit_free_iseq(const rb_iseq_t *iseq)
return;
CRITICAL_SECTION_START(4, "mjit_free_iseq");
RUBY_ASSERT_ALWAYS(in_gc);
RUBY_ASSERT_ALWAYS(!in_jit);
if (iseq->body->jit_unit) {
// jit_unit is not freed here because it may be referred by multiple
// lists of units. `get_from_list` and `mjit_finish` do the job.