Repository navigation
Self-host: JIT/AOT process builtins for Linker (escapeshellarg, phpc_run_command) - #2786
Merged
Merged
Conversation
Real lowering for escapeshellarg and phpc_run_command replaces proc_open in lib/AOT/Linker.php for compiled bundles; Zend compile keeps a narrow polyfill loaded from bin/compile.php. 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
escapeshellarg()andphpc_run_command()vialib/AOT/runtime/phpc_process.c(__compiler_escapeshellarg,__compiler_phpc_run_command).lib/AOT/Linker.phpsubprocess capture throughphpc_run_command()so compiled spine bundles avoid unstubs forproc_open/stream_get_contents.bin/compile.phplink working with a narrowLinkerProcessPolyfillloaded only at emit time.Closes #2779
Test plan
php bin/compile.php -l test/bootstrap-aot/linker_process_smoke.phptest/bootstrap-aot/linker_process_smoke.php(exit 0)make bootstrap-selfhost-linkBOOTSTRAP_LIB_SPINE_SMOKE=1 make bootstrap-selfhost-lib-spine-smokeInventoryBlockerLoweringTest+SelfHostBuiltinPolicyTestMade with Cursor