Skip to content

Commit 4a082b5

Browse files
committed
Fix assertion in rb_gc_impl_mark_weak
The FL_WB_PROTECTED flag is no longer used and is not set on objects, so that assertion cannot be true. Instead, we should use RVALUE_WB_UNPROTECTED.
1 parent 02299d6 commit 4a082b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gc/default/default.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4505,7 +4505,7 @@ rb_gc_impl_mark_weak(void *objspace_ptr, VALUE *ptr)
45054505
{
45064506
rb_objspace_t *objspace = objspace_ptr;
45074507

4508-
GC_ASSERT(objspace->rgengc.parent_object == 0 || FL_TEST(objspace->rgengc.parent_object, FL_WB_PROTECTED));
4508+
GC_ASSERT(objspace->rgengc.parent_object == 0 || !RVALUE_WB_UNPROTECTED(objspace, objspace->rgengc.parent_object));
45094509

45104510
VALUE obj = *ptr;
45114511

0 commit comments

Comments
 (0)