From b94df81be2955f3b00bac8927da0a29e6951f2e4 Mon Sep 17 00:00:00 2001 From: Satoshi Tagomori Date: Sun, 11 May 2025 22:38:02 +0900 Subject: [PATCH] RUBY_TYPED_WB_PROTECTED should be specified with write barrier protection on this object. https://github.com/tagomoris/ruby/pull/7 RUBY_TYPED_FREE_IMMEDIATELY can be added because namespace_entry_free does no IO nor things to block. --- namespace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/namespace.c b/namespace.c index 61481a4524..e6e59e3fe1 100644 --- a/namespace.c +++ b/namespace.c @@ -462,7 +462,6 @@ rb_namespace_entry_mark(void *ptr) } #define namespace_entry_free RUBY_TYPED_DEFAULT_FREE -// TODO: free all objects in rb_namespace_t, including st_table members? static size_t namespace_entry_memsize(const void *ptr) @@ -478,7 +477,7 @@ const rb_data_type_t rb_namespace_data_type = { namespace_entry_memsize, rb_namespace_gc_update_references, }, - 0, 0, RUBY_TYPED_WB_PROTECTED + 0, 0, RUBY_TYPED_FREE_IMMEDIATELY // TODO: enable RUBY_TYPED_WB_PROTECTED when inserting write barriers }; VALUE