Skip to content

Commit ff198ad

Browse files
luke-gruberjhawthorn
authored andcommitted
Add assertion to rb_gc_impl_writebarrier
We should only be executing WBs when GC is not running. We ran into this issue when debugging 3cd2407.
1 parent bd8e566 commit ff198ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gc/default/default.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6044,6 +6044,7 @@ rb_gc_impl_writebarrier(void *objspace_ptr, VALUE a, VALUE b)
60446044

60456045
if (SPECIAL_CONST_P(b)) return;
60466046

6047+
GC_ASSERT(!during_gc);
60476048
GC_ASSERT(RB_BUILTIN_TYPE(a) != T_NONE);
60486049
GC_ASSERT(RB_BUILTIN_TYPE(a) != T_MOVED);
60496050
GC_ASSERT(RB_BUILTIN_TYPE(a) != T_ZOMBIE);

0 commit comments

Comments
 (0)