Walking the heap needs a stable set of pages: a concurrent GC on another Ractor is stop-the-world and would otherwise pause the walk mid-iteration and free or move objects out from under the callback. Callers that mutate what they visit ...ko1 (Koichi Sasada)
iseq->aux.loader.obj holds the ibf loader while an iseq is ISEQ_NOT_LOADED_YET, and iseq_mark marks it, so the store into it is a GC-managed reference and should go through the write barrier rather than a raw assignment. Co-Authored-By:...ko1 (Koichi Sasada)
rb_postponed_job_trigger_for_ractor(h, running_ractor) runs a preregistered postponed job on running_ractor rather than on the caller's or the main Ractor: the handle's bit is set in a per-Ractor atomic mask and a POSTPONED_JOB interrupt...ko1 (Koichi Sasada)
rb_postponed_job_preregister already stores table[i].func/data with atomic CAS/EXCHANGE, but rb_postponed_job_flush read them non-atomically, which races when a job is (pre)registered on another thread while a job fires. Load them atomic...ko1 (Koichi Sasada)
The concurrent set, managed id-table dups and symbol id-entry buckets are reachable from every Ractor via VM-global state (the frozen-string/symbol tables, shape-tree edge tables, the symbol table), so flag them shareable -- as enc_list_...ko1 (Koichi Sasada)
concurrent_set.c now includes ruby/ractor.h for RB_OBJ_SET_SHAREABLE. (id_table.c is #included into symbol.c, which already depends on ruby/ractor.h, so no separate entry is needed.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply...ko1 (Koichi Sasada)
rb_get_freeze_opt and rb_obj_clone_setup lazily initialized shared static caches (the freeze keyword id and the `{freeze: true/false}` hashes) with a plain `if (!cache)` guard. When Ractors run #clone concurrently this races: a thread ca...ko1 (Koichi Sasada)
ractor_closed_port_p asserts the owning ractor's lock is held for foreign access and reads sync.ports via st_lookup, but Ractor::Port#closed? (ractor_port_closed_p) called it without the lock. From a foreign Ractor this tripped the asser...ko1 (Koichi Sasada)
Defer creating a Ractor main thread's pending-interrupt queue and mask stack from thread_create_core (the creating thread) to thread_start_func_2 (the new Ractor's own main thread). The mask stack starts empty rather than duplicating the...ko1 (Koichi Sasada)