You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A generator's raw-typed by-ref param loses the lazy write when the caller's variable is an undefined (vivified) local. #187
area:refsReference cells / by-ref semanticsbugSomething isn't workingneeds-designNeeds a design/epic, not a local fixwrong-answerCompiles and runs, output differs from php
Known-bug repro: tests/aot/repro/wrong/generator_raw_byref_param_vivified_cell.php — bash tests/aot/xfail.sh -k generator_raw_byref_param_vivified_cell reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.
Scope: heap ref-box for generator by-ref params. A vivified out-variable is a cell slot and the call site uses the scratch-and-rebox path (emitByRefCellUnboxArg), which writes the scratch back when the call returns. A generator writes its parameter lazily at first resume, by which time the scratch is a dead stack slot. Fix: back the generator's by-ref param with a heap ref box. The same laziness hole exists in the reverse direction (a raw caller local passed to a cell param). Found in batch E; skipped.
area:refsReference cells / by-ref semanticsbugSomething isn't workingneeds-designNeeds a design/epic, not a local fixwrong-answerCompiles and runs, output differs from php
Activity
blacktrs commentedon Oct 13, 2026
Scope: heap ref-box for generator by-ref params. A vivified out-variable is a cell slot and the call site uses the scratch-and-rebox path (
emitByRefCellUnboxArg), which writes the scratch back when the call returns. A generator writes its parameter lazily at first resume, by which time the scratch is a dead stack slot. Fix: back the generator's by-ref param with a heap ref box. The same laziness hole exists in the reverse direction (a raw caller local passed to a cell param). Found in batch E; skipped.