Fix user-script AOT multipart $_FILES populate (#15624)#18449
Merged
Conversation
Secondary fix for FileUploadWeb AOT: compileSuperglobalNullReadIsset uses peekStringKeyValue (string slots only) but upload entries are nested hashtables. Exclude _FILES from that fast path. Primary multipart populate still broken — not merge-ready. Co-authored-by: Cursor <cursoragent@cursor.com>
Restore native LLVM multipart refresh (__phpc_parse_multipart_post) for user-script standalone AOT — the #18115 MultipartNativeJitHelper bridge did not populate sg_* at runtime. Re-split urlencoded POST to __compiler_parse_str (working path). Exclude _FILES from isset peekStringKey fast path so nested upload hashtables are visible. Verification: FILE_UPLOAD_WEB_AOT_SMOKE_GATE=1 vendor/bin/phpunit --filter FileUploadWebAotExecuteTest vendor/bin/phpunit --filter RuntimeSuperglobalRefreshTest::testNestedFilesFieldAot vendor/bin/phpunit --filter MultipartRuntimeShrinkTest make bootstrap-selfhost-vm-driver-execute-probe Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 13, 2026
PurHur
added a commit
that referenced
this pull request
Jul 13, 2026
…1492) (#18548) #18449 restored StringMultipartStandaloneLlvm which calls __phpc_parse_str_* subhelpers, but #18466 had removed ParseStrUserScriptDelimitedJit. Re-wire ensureSubhelpers in ParseStrRuntime::ensureUserScriptLinked so user-script multipart/superglobal refresh links at AOT build time. Verification: ./script/check-aot-build-smoke.sh php vendor/bin/phpunit --filter SuperglobalsBracketRuntimeStandaloneTest Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
added a commit
that referenced
this pull request
Jul 13, 2026
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
Fixes #15624 —
examples/006-FileUploadWebAOT execute no longer populates nested$_FILESafter multipart POST.Root cause: #18115 routed all POST bodies through
MultipartNativeJitHelpervia__compiler_multipart_populate_post_body, but the compiled PHP helper bridge did not populate nativesg_*at runtime (regression from deletingStringMultipartStandaloneLlvm). Urlencoded POST was also broken because the urlencoded fast path was removed.Fix:
__phpc_parse_multipart_postviaStringMultipartStandaloneLlvm) for user-script AOT refresh; keep urlencoded POST on__compiler_parse_str.isset($_FILES['field'])— exclude_FILESfrompeekStringKeyValuefast path (nested upload entries are hashtables).MultipartRuntimeno-op stub vs real bridge entry ordering.Verification
Note:
RuntimeSuperglobalRefreshTest::testMultipartPostBodystill fails on master (usesREQUEST_BODY_FILE; user-script LLVM refresh readsREQUEST_BODYonly) — separate gap.Closes #15624