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 by-value array $a param appended in the callee: crash / raw pointer / caller's array mutated #27
area:refsReference cells / by-ref semanticsarea:typesType inference / representation / VRAbugSomething 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/array_param_append.php — bash tests/aot/xfail.sh -k array_param_append 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: needs the parked element-repr epic.function h(array $a){ $a[]=1; } called with an assoc string array: the callee's base is erased (unknown) and the stored value is a raw int, so the store stamps the buffer's element hint as INT without converting the existing string pointers. The proper fix is a boxed store into erased bases (Ownership::storeElemBoxesValue for KIND_UNKNOWN). That function's comment and the red case tests/aot/cases/array_erased_elem_repr_gap.php record why it is not done: the repr nibble is fixed at allocation, boxed values in a raw-repr buffer get freed as tagged words, and gen-2 segfaulted on its own smoke test. The g(array) and closure parts of the repro already pass. Found in batch D; skipped.
area:refsReference cells / by-ref semanticsarea:typesType inference / representation / VRAbugSomething 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: needs the parked element-repr epic.
function h(array $a){ $a[]=1; }called with an assoc string array: the callee's base is erased (unknown) and the stored value is a raw int, so the store stamps the buffer's element hint as INT without converting the existing string pointers. The proper fix is a boxed store into erased bases (Ownership::storeElemBoxesValuefor KIND_UNKNOWN). That function's comment and the red casetests/aot/cases/array_erased_elem_repr_gap.phprecord why it is not done: the repr nibble is fixed at allocation, boxed values in a raw-repr buffer get freed as tagged words, and gen-2 segfaulted on its own smoke test. Theg(array)and closure parts of the repro already pass. Found in batch D; skipped.