Summary
- Use the atomic mark-claim path for all parallel heaps, not only concurrently marking heaps.
- Document why the parallel whitening pass stores to mark bits atomically: a lagging peer from the previous mark window can still reach
claimMarkwithout holdingalloc_lock.
Why
The zig-js no-GIL/TSan verification found a race between parallel whitening and a peer claimMark from the previous mark window. The fix keeps that byte atomic on both sides in parallel heaps.
Validation
zig build test
zig build test -Dtsan=trueAlso validated from zig-js during the issue #1 threading roadmap pass:
zig build test
zig build threads-test
zig build test -Dtsan=true
zig build test -Dtsan=true -Dtest-filter=parallel_js
zig build threadfuzz -Dfuzz-verify=true -Dfuzz-iters=300