julia
93a32fae - module: add missing GC write barriers for bpart->restriction stores (#61120)

Commit
141 days ago
module: add missing GC write barriers for bpart->restriction stores (#61120) discovered via automated Claude audit for typos and other minor / obvious bugs. I manually reviewed each result I was less sure about this one but robot seems confident so I'm pasting the message it gave as-is Add a `jl_gc_wb` in `jl_update_loaded_bpart` after storing `resolution.binding_or_const` into an existing (potentially old-generation) binding partition's restriction field, matching every other non-fresh store to this field. Add a `jl_gc_wb_fresh` in `jl_replace_binding_locked2`'s `IMPLICIT_RECOMPUTE` path, where `jl_resolve_implicit_import` can trigger GC between the allocation of `new_bpart` and the store, potentially promoting the fresh partition to an older generation. The else branch already had the corresponding `jl_gc_wb_fresh`. Neither bug is currently triggerable because the stored values are always independently rooted through the module binding table, but the barriers are needed to maintain GC invariants and guard against future code changes. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> (cherry picked from commit f6fd24c4fae57e7a42581725571c8827a7913374)
Author
Committer
Parents
Loading