Skip to content

Commit

Permalink
Assert unit->iseq null out happens under the JIT/GC guard
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Dec 3, 2020
1 parent 58c3c75 commit 541e434
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mjit.c
Expand Up @@ -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.
Expand Down

0 comments on commit 541e434

Please sign in to comment.