Assume VM locked in rb_mark_generic_ivar
rb_gen_ivtbl_get locks the VM, but the VM must be locked during marking so we can directly read from the generic_ivtbl without locking the VM.
This commit is contained in:
parent
79a8750ade
commit
cd86393ad8
Notes:
git
2024-10-04 12:51:00 +00:00
@ -1107,9 +1107,9 @@ gen_ivtbl_resize(struct gen_ivtbl *old, uint32_t n)
|
||||
void
|
||||
rb_mark_generic_ivar(VALUE obj)
|
||||
{
|
||||
struct gen_ivtbl *ivtbl;
|
||||
|
||||
if (rb_gen_ivtbl_get(obj, 0, &ivtbl)) {
|
||||
st_data_t data;
|
||||
if (st_lookup(generic_ivtbl_no_ractor_check(obj), (st_data_t)obj, &data)) {
|
||||
struct gen_ivtbl *ivtbl = (struct gen_ivtbl *)data;
|
||||
if (rb_shape_obj_too_complex(obj)) {
|
||||
rb_mark_tbl_no_pin(ivtbl->as.complex.table);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user