php-in-php: lazy CliArgvRuntime from ensureMinimal (#34822) - #34825
Merged
Conversation
Drop always-on CLI argv ABI link during thin AOT init; call sites and
compileToFile already ensureLinked. Restore insert block after mid-{main}
emit to avoid Module.php:180 / *.1 mint (#32122 class).
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
CliArgvRuntime::ensureStandaloneBodiesfromContext::ensureMinimalUserStandaloneBodiesso thin AOT hello-world / aot-smoke no longer eagerly links CLI argv ABI during init (#32122/*.1mint class; peer#34812/#34807).compileToFilethin path +CliArgvGlobalInit/JitGetoptalready ensureLinked before lookup.#27317/#34812) so mid-{main}$argc/$argvensureLinked does not orphan calls / failModule.php:180.Closes #34822
php-src:
ext/standard/basic_functions.c—$argc/$argvCLI SAPITest plan
./script/phpunit.sh --filter 'ContextMinimalStandaloneLazy|CliArgvRuntimeShrinkTest|CliArgvGlobalInitTest|CliArgvRuntimeStandaloneTest'→ OK (58 tests, 374 assertions)./script/aot-smoke.sh→ 8/8hi;$argc/$argv[0]→1|y; mid-{main}echo "x"; echo $argc→x1__phpc_cli_store_argvvia compileToFile (nm count 1)Made with Cursor