summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-12-03 00:01:10 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2020-12-03 00:01:11 -0800
commit541e4340dd70de75d44c8ac3b5a4a69943042737 (patch)
tree8180782f93368b34cd1b22f7cff718ba760a9246
parent58c3c75fee775abb9a145e7b106320a55f2c8be1 (diff)
Assert unit->iseq null out happens under the JIT/GC guard
-rw-r--r--mjit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mjit.c b/mjit.c
index c65355fba9..34f83a4633 100644
--- a/mjit.c
+++ b/mjit.c
@@ -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.