Repository navigation
php-in-php: prep ParseStrNative refresh path (toward #18855) - #18863
Merged
Merged
Conversation
Unset user-script AOT env during nested VM-helper JIT, route StringParseStr standalone init through ensureUserScriptLinked, and harden parse_str bridge stub replacement plus callHelper dest materialization. Full deletion of ParseStrUserScriptDelimitedJit remains blocked: LLVM bridges into nested ParseStrNativeJitHelper omit ptrtoint so destPtr stays zero at runtime (NestedSuperglobalsAotTest repro). Co-authored-by: Cursor <cursoragent@cursor.com>
3 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
Preparatory fixes toward deleting
ParseStrUserScriptDelimitedJit.phpand routing user-script superglobal refresh throughParseStrNativeJitHelper/__compiler_parse_str(#18855).JitVmHelperLink: unsetPHP_COMPILER_AOT_USER_SCRIPTduring nested VM-helper JIT (mirrors preg path; fixes no-op stub helpers under user-script AOT init Fix AOT CGI superglobal refresh: QUERY_STRING populates $_GET (closes #18832) #18841).StringParseStr: user-script standalone init callsParseStrRuntime::ensureUserScriptLinked()instead of embedensureLinked().ParseStrRuntime: replace deferred stub bodies before re-emitting bridges; materializedestvia alloca +callHelper.Not in this PR:
ParseStrUserScriptDelimitedJit.phpdeletion — blocked on nested-helper ABI (below).Blocker (full #18855)
Routing refresh through
ParseStrNativeJitHelper::parseIntoNative(via__compiler_parse_stror direct LLVMcall) leaves$_GETempty in real AOT binaries.Disassembly shows LLVM bridges pass
(i64* stack, __hashtable__*, __string__*)without emittingptrtoint(ht);parseIntoNativeentry keepsdestPtr=0and returns early. Master’s hand-LLVM__phpc_parse_str_parse_delimited_pairspath still required for greenNestedSuperglobalsAotTest.Next step: fix external LLVM → nested JIT
intparam ABI (emitptrtointin rdi, or load param 0 correctly at helper entry), then re-apply refresh routing + delete ~1020-line delimited JIT file.Test plan
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/aot/NestedSuperglobalsAotTest.php test/unit/ParseStrRuntimeShrinkTest.php test/unit/JIT/SuperglobalsBracketRuntimeStandaloneTest.php' make bootstrap-selfhost-vm-driver-execute-probeMade with Cursor