php-in-php: delete JitEnv emitLibcPutenvMirror — PutenvJitHelper + kernel (#23414) - #23441
Merged
Conversation
…pc_putenv_kernel (#23414) Move process-environ setenv mirroring out of caller-side JitEnv LLVM into a slim PutenvJitHelper NestedJIT leaf (peer GetenvLookupJitHelper/rename), so user-script AOT no longer co-emits GetenvJitHelper::apacheSetenv. JitEnv drops ~108 LOC of malloc/strchr/setenv; kernel keeps the proven assignment-string mirror for libc getenv readers. Co-authored-by: Cursor <cursoragent@cursor.com>
6 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
emitLibcPutenvMirror/ inline malloc+setenv LLVM fromJitEnv.php(~108 LOC removed; 262→154 lines).PutenvJitHelperNestedJIT leaf +phpc_putenv_kernel/JitPutenvKernel(peer getenv/rename), avoiding co-emission ofGetenvJitHelper::apacheSetenvthat segfaulted user-script AOT putenv on master.PutenvRuntimeShrinkTestto guard absence of caller-side LibcExtern; inventory/spine include new files (6574/6574).Closes #23414
php-src reference
ext/standard/basic_functions.c—zif_putenvPHP implementation
ext/standard/PutenvJitHelper.php— overlay + kernel callext/standard/JitPutenvKernel.php/phpc_putenv_kernel.php— thin setenv mirrorext/standard/JitEnv.php— helper-only putenv pathsC runtime
runtime/*.c. Net shrink: caller-side LLVM deleted fromJitEnv.php(−108 lines).Verification
Made with Cursor