You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GC: retire and destroy precise sibling realms safely #419
Complete the engine-core sibling lifecycle before #416 adopts it at the private ABI boundary.
Acceptance:
Stop realm jobs, timers, waiters, and threads before root retirement.
Remove the realm from the live root set atomically, run a synchronous full collection, and drain its deferred finalizers.
Release non-cell realm state and arena storage only after no owned cell can reference it.
Keep the heap owner alive until every sibling is retired and reject premature owner destruction.
Prove retained handles, shared Symbol identity, sibling reachability, exact finalization, relocation, and terminal teardown in Debug, ReleaseSafe, and TSan.
a real createSharedPreciseRealm engine-core constructor with an independent non-cell arena, one shared precise heap/JIT, stable realm ID, failure-atomic bootstrap promotion, and VM-wide Symbol registry identity;
terminal retirement that rejects active interpreters/threads, stops terminal work, cancels timers, drops job/waiter/handle roots, atomically retires the realm, performs a synchronous full collection, drains deferred callbacks, and releases non-cell state only after hasRealmCells is false;
retryable RealmCellsRemain behavior when an owner-realm protected handle still reaches sibling cells;
an early all-build owner-destruction trap before any heap mutation while a live/bootstrapping/retiring sibling remains;
owner-only compaction with every live sibling quiescent.
Focused evidence exercises distinct globals/arenas, shared Symbol identity, protected-handle relocation, compaction refusal with sibling jobs, cross-realm reachability, exact finalizer accounting, one-shot external callback delivery, retryable retirement, and terminal teardown. Results: Debug 3/3, ReleaseSafe 3/3, TSan 3/3; all zero leaks.
Activity
feat(gc): retire precise sibling realms (#419)
chrisbbreuer commentedon Jul 21, 2026
Completed on
mainby 34762f8, building on #420/#421.Implemented:
createSharedPreciseRealmengine-core constructor with an independent non-cell arena, one shared precise heap/JIT, stable realm ID, failure-atomic bootstrap promotion, and VM-wide Symbol registry identity;hasRealmCellsis false;RealmCellsRemainbehavior when an owner-realm protected handle still reaches sibling cells;Focused evidence exercises distinct globals/arenas, shared Symbol identity, protected-handle relocation, compaction refusal with sibling jobs, cross-realm reachability, exact finalizer accounting, one-shot external callback delivery, retryable retirement, and terminal teardown. Results: Debug 3/3, ReleaseSafe 3/3, TSan 3/3; all zero leaks.
chrisbbreuer commentedon Jul 21, 2026
All acceptance items are implemented and checked; private ABI adoption continues in #416.