php-in-php: lazy undef-array-key from HashTable::implement (Re #32122) - #35649
Merged
Conversation
…#35392) Move StringTriggerError declare/ensure from HashTable::implement entry to implementReadStringKeyValue only — peer #35626 strcoll lazy pattern. Scripts that use arrays but never read missing string keys skip NestedJIT trigger_error during init, reducing cold-build LLVM surface (#31894 / #32122 .1 mint class). Co-authored-by: Cursor <cursoragent@cursor.com>
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
StringTriggerError::declareUndefinedArrayKeyAbis+ensureLinkedout ofHashTable::implement()entry into a newensureUndefinedArrayKeyAbis()helper called only fromimplementReadStringKeyValue()(the sole HashTable implement* that emits__compiler_undefined_array_key_warning_cstr).HashTableReadLlvm/trigger_error_/AssertFailcall-site ensures unchanged.Why
Thin hello-world and other scripts that allocate hashtables but never read missing string keys were still NestedJIT-ing
StringTriggerErrorduringHashTable::implement()— leftover Runtime vs NestedJIT ABI drift can mintundefined_array_key_warning_*.1and abort cold-build (#31894 / #32122).Test plan
./script/phpunit.sh --filter 'HashTableLazyUndefinedArrayKeyRuntimeShrinkTest|TypeRegisterLazyStringTriggerErrorRuntimeShrinkTest|TypeDeadUndefinedArrayKeyAbiRuntimeShrinkTest|TypeDeadTriggerErrorAbiRuntimeShrinkTest|TypeDeadTypeInitializeLazyTimeEnvTriggerPendingRuntimeShrinkTest'→ OK (21 tests, 138 assertions)./script/aot-smoke.sh→ 8/8./script/docker-exec.sh -- bash -lc './script/cold-build-check.sh'→ ok (~4s)Not run: full
ci-local.sh, differential sweep (no observable behavior change — lazy link only moves when NestedJIT runs).Made with Cursor