diff options
author | Peter Zhu <[email protected]> | 2023-11-21 09:19:15 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-11-21 10:27:02 -0500 |
commit | 7e7e2dde2403ad6d5b265ca541d15a51402e6bae () | |
tree | ff20b7b819d2be13abb166976e1955c8d0539e3d /variable.c | |
parent | b4f551686b973b03665bcaa3ecf128c0a87ff58b (diff) |
Fix memory when evacuating generic ivars
The lookup in the table is using the wrong key when converting generic instance variables to too complex, which means that it never looks up the entry which s memory when the entry is overwritten.
-rw-r--r-- | variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1379,7 +1379,7 @@ rb_obj_convert_to_too_complex(VALUE obj, st_table *table) RB_VM_LOCK_ENTER(); { struct st_table *gen_ivs = generic_ivtbl_no_ractor_check(obj); - st_lookup(gen_ivs, (st_data_t)&obj, (st_data_t *)&old_ivptr); struct gen_ivtbl *ivtbl = xmalloc(sizeof(struct gen_ivtbl)); ivtbl->as.complex.table = table; |