Repository navigation
php-in-php: getenv_all shares EnvironMirrorRuntime thin kernel ABI (#21579) - #21585
Merged
Merged
Conversation
…21579) Route zero-arg getenv() through __superglobals__mirror_process_environ. Thin standalone AOT uses JitEnvironMirrorKernel in EnvironMirrorRuntime (NestedJIT helper is empty under thin AOT); embed keeps NestedJIT helper. 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
getenv()(StringGetenvAll) through shared__superglobals__mirror_process_environinstead of inliningJitEnvironMirrorKernelinto__compiler_getenv_all.EnvironMirrorRuntimeemits the libc environ walk in the ABI body (NestedJITEnvironMirrorNativeJitHelperreturns empty under thin AOT — same blocker as closed php-in-php: delete JitEnvironMirrorKernel libc environ walk — mirror via /proc + native HT setters (#19157 follow-up) #21580).Closes #21579
php-src reference
ext/standard/basic_functions.c—zif_getenvargc==0sapi/cli/php_cli.c— environ →$_SERVERLines / surface
JitEnvironMirrorKernel::mirrorIntoHashtablePtrfromStringGetenvAll(~getenv_all bridge duplication).EnvironMirrorRuntime::implementThinKernelBridgefor thin AOT (not deleted — NestedJIT leaf still needed for embed/phpc_native_environ_mirror_into_ht).Verification
Note:
AotTestdatasetgetenv_allstill missesAPP_DEBUG/putenvoverlay lines on master and this branch alike (pre-existing harness/--ENV--overlay gap — not regressed; PATH/HOME environ fill is green).Made with Cursor