Parents: #475, #641 Related: #640
Problem
Fresh Linux unit evidence after #641 shows Intl.DateTimeFormat resolved state is reclaimed under a bounded precise heap escaping with OutOfMemory. The exact stack is not in DateTimeFormat structural-part storage: it reaches Interpreter.makeBound through intlBoundAccessorFn while reading formatter.format.
The Intl accessor already knows the required cached callable metadata: ECMA-402 specifies an empty name and fixed length, and the formatter instance caches that callable. It nevertheless constructs a full generic Function.prototype.bind result first, reads the implementation name/length, allocates a transient "bound " + name, publishes those generic properties, and then overwrites them with the Intl metadata. Repeated formatter churn makes that avoidable path part of the bounded-heap attack surface.
Required implementation
- Give bound-function construction an exact metadata path that publishes the final
nameandlengthonce. - Keep generic
Function.prototype.bindobservable behavior and ordering exact. - Use the exact path for Intl NumberFormat/DateTimeFormat
formatand Collatorcompareaccessors. - Preserve per-instance identity caching, hidden property attributes, GC relocation/tracing, and OOM rollback.
- Do not raise heap limits, reduce witness iterations, or bypass the accessor.
Acceptance
- Focused tests prove generic bind metadata/coercion behavior is unchanged and Intl accessors retain exact name, length, identity, and call behavior.
- Allocation-failure coverage proves no partially cached bound accessor is observable.
- The unchanged 4 MiB DateTimeFormat bounded witness passes on Linux and locally, normally and under TSan.
- NumberFormat, DateTimeFormat, and Collator unit/Test262 surfaces have zero regressions.
- Full unit and TSan shards are leak/race free.
CI evidence: run 32365143787, unit shard 0/4, job 96413010000. The failure occurs at src/interpreter.zig:7291 from intlBoundAccessorFn.