From 5a048829a488bb1cb4b0e77b3d46a1920ad92136 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Wed, 15 Sep 2021 02:40:42 -0700 Subject: [PATCH] Add WB_PROTECTED to mutexes mutex_mark is (basically) NULL, so we don't have any references to mark. This means we should safely be able to mark Mutex as WB_PROTECTED without changing anything else. --- thread_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thread_sync.c b/thread_sync.c index ba5a78ca0a..98d95ff009 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -125,7 +125,7 @@ mutex_memsize(const void *ptr) static const rb_data_type_t mutex_data_type = { "mutex", {mutex_mark, mutex_free, mutex_memsize,}, - 0, 0, RUBY_TYPED_FREE_IMMEDIATELY + 0, 0, RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FREE_IMMEDIATELY }; static rb_mutex_t *