summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-10-03 16:20:16 -0400
committerPeter Zhu <[email protected]>2024-10-04 08:50:43 -0400
commitcd86393ad858d29c1204fd3f1561dca9c96fec16 ()
tree8239a0e4d3a2929daf2da7fa01af77b4bde4325a /variable.c
parent79a8750ade3e332c1ab78aa9cbc6ca7fd823dec2 (diff)
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.
Notes: Merged: https://.com/ruby/ruby/pull/11785
-rw-r--r--variable.c6
1 files changed, 3 insertions, 3 deletions
@@ -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)) {
if (rb_shape_obj_too_complex(obj)) {
rb_mark_tbl_no_pin(ivtbl->as.complex.table);
}