Skip to content

php-in-php: drop Context ensureFullStandaloneBodies always-on CliArgvRuntime — lazy at compileToFile / CliArgvGlobalInit (ext/standard/basic_functions.c) #35133

Description

@PurHur

Category

bug · php-in-php · Trust / #32122 .1 mint class · ensureFullStandaloneBodies shrink

Problem

Context::ensureFullStandaloneBodies still NestedJITs CliArgvRuntime (__phpc_cli_*) during full standalone init. Non-user-script full standalone pays that NestedJIT during init — leftover Context NestedJIT vs Runtime ABI drift mints cli_*.1 (#31894 / #32122).

Peer #34822 already dropped CliArgv from ensureMinimalUserStandaloneBodies (thin user-script). Call sites already ensure before lookup:

  • Context::compileToFile thin path (CliArgvRuntime::ensureStandaloneBodies before __phpc_cli_store_argv)
  • CliArgvGlobalInit::emitRefreshAfterStoreArgv / JitGetopt
  • ensureBootstrapAotStandaloneBodies keeps bootstrap-aot fixtures linked

Full path should move the ensure to compileToFile for all standalone (not only thin), then drop from ensureFullStandaloneBodies.

php-src reference

PHP implementation target

Repro

./script/aot-smoke.sh   # must stay 8/8
./script/phpunit.sh --filter ContextFullStandaloneLazyCliArgv

Done when

  • ensureFullStandaloneBodies does not call CliArgvRuntime::ensureStandaloneBodies / ensureLinked
  • compileToFile ensures CliArgv for all standalone before __phpc_cli_store_argv
  • ./script/aot-smoke.sh → 8/8
  • Unit shrink test green; no new runtime/*.c

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:compilerCompiler / CFG / JITbugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions