diff options
author | Alan Wu <[email protected]> | 2024-04-26 20:03:48 -0400 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2024-04-26 18:03:26 -0700 |
commit | 73eeb8643b8dcb5a059cb55a21da2e77a2febd24 (patch) | |
tree | 7ca736e21b5716aa500b01cb85809762edcedf92 /yjit.c | |
parent | c746332c797a6bd1a887538b2bc7ad57b2055f36 (diff) |
YJIT: Fix reference update for `Invariants::no_ep_escape_iseqs`
Previously, the update was done in the ISEQ callback. That effectively
never updated anything because the callback itself is given an intact
reference, so it could update its content, and `rb_gc_location(iseq)`
never returned a new address. Update the whole table once in the YJIT
root instead.
Diffstat (limited to 'yjit.c')
-rw-r--r-- | yjit.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -1164,20 +1164,14 @@ yjit_root_memsize(const void *ptr) return 0; // TODO: more accurate accounting } -// GC callback during compaction -static void -yjit_root_update_references(void *ptr) -{ - // Do nothing since we use rb_gc_mark(), which pins. -} - void rb_yjit_root_mark(void *ptr); // in Rust +void rb_yjit_root_update_references(void *ptr); // in Rust // Custom type for interacting with the GC // TODO: make this write barrier protected static const rb_data_type_t yjit_root_type = { "yjit_root", - {rb_yjit_root_mark, yjit_root_free, yjit_root_memsize, yjit_root_update_references}, + {rb_yjit_root_mark, yjit_root_free, yjit_root_memsize, rb_yjit_root_update_references}, 0, 0, RUBY_TYPED_FREE_IMMEDIATELY }; |