diff options
| author | Luke Gruber <luke.gruber@shopify.com> | 2025-10-03 12:25:20 -0400 |
|---|---|---|
| committer | John Hawthorn <john@hawthorn.email> | 2025-10-03 11:15:56 -0700 |
| commit | ff198ad904652ddea3af0a976867ae2c2b6cf5b8 (patch) | |
| tree | 5da3e5ca0db151a8c8ad8e0cf792a19dafb0b26d | |
| parent | bd8e566b328b3308d638883a28f1a54f218e4fd7 (diff) | |
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.
| -rw-r--r-- | gc/default/default.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gc/default/default.c b/gc/default/default.c index 9b40fed097..c23adae062 100644 --- a/gc/default/default.c +++ b/gc/default/default.c @@ -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); |
