Don't check_rvalue_consistency in is_markable_object

is_markable_object is called by rb_objspace_markable_object_p, which
may pass a T_NONE object. check_rvalue_consistency will fail if a T_NONE
object is passed in.
This commit is contained in:
Peter Zhu 2024-03-01 13:38:49 -05:00
parent 661f9e6d03
commit 6f31dd495c

4
gc.c
View File

@ -4415,9 +4415,7 @@ is_live_object(rb_objspace_t *objspace, VALUE ptr)
static inline int
is_markable_object(VALUE obj)
{
if (RB_SPECIAL_CONST_P(obj)) return FALSE; /* special const is not markable */
check_rvalue_consistency(obj);
return TRUE;
return !RB_SPECIAL_CONST_P(obj);
}
int