ReviewOS

zig-utils/zig-js

Test: replace retired allocation-kernel GC checkpoint assumption

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

Parent: #1081; related: #498, #491.

The terminal CI run at b64cc348 executes the retired-kernel fixture context.test.GC precise fixed-shape checkpoints preserve materialized roots and fails in both normal and TSan unit shard 3/4:

Both fail specifically at gc_precise_safepoints > precise_before. The result and minor-collection assertions pass. The combined fixture still expects the precise marker published only by the fixed-shape allocation kernel removed in #1081. Ordinary bytecode and tree-walker checkpoints retain their general root-tracing contract, so restoring that shape recognizer or marking every generic operation precise would be incorrect.

Required change:

  • Replace the retired-kernel assumption with explicit forced tree/required-bytecode coverage of ordinary material allocations and their live roots across real nursery collections.
  • Keep exact value, identity, collection, and teardown checks. Test declared precise/moving activation boundaries directly rather than infer them from a source shape.
  • Preserve existing production GC behavior, thresholds, and native contracts.

Definition of done:

  • The failure is reproduced with the focused module-root test.
  • The replacement allocation/root regression passes Debug, ReleaseSafe, and unsuppressed TSan.
  • Existing actual-moving heap-activation and native precise-checkpoint coverage remains green.
  • Changes land as a test-only conventional commit; full local unit limits and pending hosted integration are reported accurately.
9 days ago

Fixed in ee6ae904. The test now exercises ordinary allocation roots in forced tree-walker and required-bytecode execution. It pins the executed Node result 99722, requires nursery collections, compares surviving field signatures after explicit collection, and checks retained object identity. Admission counters prove the required VM path executes without fallback.

The original focused module-root fixture reproduced TestUnexpectedResult at the exact precise-counter assertion reported by both hosted shards. The replacement passes Debug, ReleaseSafe, and unsuppressed TSan with no allocator leaks. The existing prepared activation survives a moving collection before execution and optimizer fused region enters an exact outer nested loop tests also pass in all three modes; they directly cover actual moving relocation and declared native precise checkpoints.

This changes only a test block: production GC thresholds, precision flags, native contracts, and runtime behavior are unchanged; flips 0 test262 cases. The full local combined-unit link remains blocked by #933's existing 3072 MB cap. Hosted integration for the pushed revision is pending.

Sign in to comment on this issue.