sync rb_gc_register_mark_object()
rb_vm_t::mark_object_ary is global resource so we need to synchronize to access it.
This commit is contained in:
parent
e06f4a3b1f
commit
4a588e70b8
4
gc.c
4
gc.c
@ -7347,6 +7347,8 @@ rb_gc_force_recycle(VALUE obj)
|
||||
void
|
||||
rb_gc_register_mark_object(VALUE obj)
|
||||
{
|
||||
RB_VM_LOCK_ENTER();
|
||||
{
|
||||
VALUE ary_ary = GET_VM()->mark_object_ary;
|
||||
VALUE ary = rb_ary_last(0, 0, ary_ary);
|
||||
|
||||
@ -7356,6 +7358,8 @@ rb_gc_register_mark_object(VALUE obj)
|
||||
}
|
||||
|
||||
rb_ary_push(ary, obj);
|
||||
}
|
||||
RB_VM_LOCK_LEAVE();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user