AOT: nested string-offset must not autovivify array over string (#36397) - #37011
Merged
Conversation
Preserve CFG TYPE_STRING for nested FETCH_DIM_W and separate the HT string slot before byte writes so `$a['s'][0]='X'` matches Zend (no empty-array fillup). Co-authored-by: Cursor <cursoragent@cursor.com>
2 tasks
PurHur
added a commit
that referenced
this pull request
Sep 6, 2026
) Include array_cow_nested_str_offset_36397.php (#37011) so check-generated-docs stays green after the SiblingOuter Concern extract rebase onto tip. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PHPC_RUNTIME_ASSERT=1mode that checks refcount/ownership invariants, and a written memory-model spec the assertions are derived from (lib/AOT/Linker.php, lib/JIT/Builtin/Refcount.php, docs/runtime-semantics.md) #36397 (slice 18):$a['s'][0] = 'X'no longer replaces the string with an empty array under AOT.TYPE_STRINGindimFetchExpectedTypeinstead of forcingTYPE_ARRAYfor nestedFETCH_DIM_W.__string__separate+ write-back) before byte-offset assign so mutations stay reachable from the array.Zend/zend_execute.cZEND_FETCH_DIM_W+zend_assign_to_string_offset.Test plan
ab|Xb|string/Xb|string/Xb|string./script/aot-smoke.sh→ 9/9script/differential-sweep.sh --aot --repeat 10on nested dim + new case → 2/2script/differential-sweep.sh --aot --repeat 3→ 238/248 (7 DIFF + 3 COMPILE); same 7 DIFF cases fail on master without this fix (no new regressions)make north-star5-verify-fast→ OK (spine 8327/8327)Made with Cursor