mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
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 3cd2407045a67838cf2ab949e5164676b6870958.
This commit is contained in:
parent
bd8e566b32
commit
ff198ad904
@ -6044,6 +6044,7 @@ rb_gc_impl_writebarrier(void *objspace_ptr, VALUE a, VALUE b)
|
||||
|
||||
if (SPECIAL_CONST_P(b)) return;
|
||||
|
||||
GC_ASSERT(!during_gc);
|
||||
GC_ASSERT(RB_BUILTIN_TYPE(a) != T_NONE);
|
||||
GC_ASSERT(RB_BUILTIN_TYPE(a) != T_MOVED);
|
||||
GC_ASSERT(RB_BUILTIN_TYPE(a) != T_ZOMBIE);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user