From e00c46017b84583494d01f03918e1a67977c70c1 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 15 May 2025 16:42:47 -0400 Subject: [PATCH] Drop unnecessary compiler guards for memory_sanitizer We unpoison slots allocated out of the GC, so we don't need to disable the assertions that read from the memory. --- gc/default/default.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/gc/default/default.c b/gc/default/default.c index fdbedd48d4..105928f788 100644 --- a/gc/default/default.c +++ b/gc/default/default.c @@ -2119,10 +2119,8 @@ rb_gc_impl_source_location_cstr(int *ptr) static inline VALUE newobj_init(VALUE klass, VALUE flags, int wb_protected, rb_objspace_t *objspace, VALUE obj) { -#if !__has_feature(memory_sanitizer) GC_ASSERT(BUILTIN_TYPE(obj) == T_NONE); GC_ASSERT((flags & FL_WB_PROTECTED) == 0); -#endif RBASIC(obj)->flags = flags; *((VALUE *)&RBASIC(obj)->klass) = klass;