ReviewOS

zig-utils/zig-js

Test262: release --eval probe and diagnostic storage

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

Parent: #494

Problem

zig-out/bin/test262 --eval <file> allocates the source file from the runner GPA and never frees it. The error-detail list is likewise not deinitialized. A successful 290-byte probe prints OK and then the safe allocator reports the exact runEval -> readFileAlloc leak.

Acceptance

  • --eval releases the input source on every successful Context construction/evaluation path.
  • Success rendering uses Context-owned temporary storage rather than leaking an ambiguously owned Value.toString(gpa) result.
  • Failure detail storage is deinitialized after printing.
  • Successful and throwing probes retain the existing OK <value> / ERR <detail> output and exit behavior.
  • Safe-allocator execution reports no leaks; conformance runner build/self-tests pass.

No allocator suppression, leak-log filtering, process-exit workaround, ownership guess, output change, or disabled safe allocator.

9 days ago

Fixed on main by 2f387216. --eval now frees source bytes, deinitializes failure details, and uses Context-owned temporary rendering. Successful and throwing probes preserve OK 0 / ERR Error: eval detail output with no SafeAllocator leak; zig build conformance passes 33/33. Flips 0 test262 cases.

Sign in to comment on this issue.