ReviewOS

zig-utils/zig-js

GC relocation: prove no-GIL peer rejection and post-join movement

#361
Closed chris opened this 9 days ago ·
9 days ago

Parent: #336 Related: #1, #144, #359, #360

Close the remaining deterministic no-GIL overlap evidence gap without widening the supported movement boundary. A running or parked peer must make both direct and scheduled moving attempts fail closed; the exact same pending request may move only after every peer exits.

Scope:

  • create a true no-GIL precise-GC context and warm a real baseline numeric tier;
  • park a spawned Thread on the existing Atomics publication/wait protocol;
  • from a native callback, protect a survivor, prove direct compaction is unsupported, and schedule movement;
  • while the peer remains parked, run the warmed native tier through multiple movement-safe checkpoints and prove the request remains pending, no relocation token opens, and no movement counter advances;
  • after signaling and joining the peer, consume the same request quiescently and prove the protected payload moves with intact semantics;
  • machine-check the running-thread gate and document the supported/fail-closed matrix.

Acceptance:

  • deterministic running and parked peer overlap cannot observe forwarding or stale cells;
  • the request is neither lost nor prematurely cleared while peers exist;
  • post-join direct compaction reports useful movement and a dense second pass;
  • Debug, ReleaseSafe, suppression-free TSan, C/C++/Objective-C hosts, and relocation/release inventories are green.
9 days ago

Complete on main in 373181a. A deterministic no-GIL C-API witness now parks a real JavaScript peer, proves direct and scheduled movement remain deferred across baseline checkpoints while that peer is live, then joins it and consumes the same pending request as useful relocation. The protected payload moves with its property intact and the immediate second pass is no_candidates. Full compaction coverage passes 9/9 with zero leaks in Debug, ReleaseSafe, and suppression-free TSan; release-matrix and relocation-inventory validators are green.

Sign in to comment on this issue.