From 34e8eef3cf603b188d4ae3d8a1b151706c4e2dda Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 21 Oct 2024 15:58:00 -0400 Subject: [PATCH] Fix rb_gc_impl_writebarrier_remember --- gc/mmtk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gc/mmtk.c b/gc/mmtk.c index 6852bd0d4c703e..b4da78f6b97d87 100644 --- a/gc/mmtk.c +++ b/gc/mmtk.c @@ -821,7 +821,9 @@ rb_gc_impl_writebarrier_unprotect(void *objspace_ptr, VALUE obj) void rb_gc_impl_writebarrier_remember(void *objspace_ptr, VALUE obj) { - rb_gc_impl_writebarrier(objspace_ptr, obj, Qundef); + struct MMTk_ractor_cache *cache = rb_gc_get_ractor_newobj_cache(); + + mmtk_object_reference_write_post(cache->mutator, (MMTk_ObjectReference)obj); } // Heap walking