Repository navigation
php-in-php: PasswordRandomBytesRuntime NestedJIT → JitVmHelperLink::ensureCompiled (#1492) #22313
Copy link
Copy link
Closed
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITenhancementNew feature or requestNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevExPhase 0 – foundation & DevEx
Description
Activity
- addedenhancementNew feature or requestNew feature or requestphase-0:FoundationPhase 0 – foundation & DevExPhase 0 – foundation & DevExarea:compilerCompiler / CFG / JITCompiler / CFG / JITimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claim
on Jul 22, 2026 claim: PHP Runtime → PHP — starting this run
Migrating
PasswordRandomBytesRuntimeNestedJIT hand-roll toJitVmHelperLink::ensureCompiled(peer FtokRuntime #22300 / StringStrcoll #22256).Pre-claim gate snapshot (master @ c9a2793)
Gate Status make bootstrap-selfhost-linkin progress (Zend gen-0 fallback after stale native driver #21855) php script/bootstrap-inventory.php --checkFile-list drift (docs regen pending; not a code fail) prior peer run user_release_ready: yeson recent masterMerged via #22317.
Verification
Command Result vendor/bin/phpunit test/unit/PasswordRandomBytesRuntimeShrinkTest.phpOK (3 tests, 11 assertions) vendor/bin/phpunit test/unit/PasswordCryptoRuntimeShrinkTest.phpOK (7 tests) make bootstrap-selfhost-vm-driver-execute-probeOK make north-star5-verify-fastOK (fast) php script/bootstrap-inventory.php --checkOK 6415/6415 php script/check-bootstrap-gen0-manifest-sync.phpOK ( 79b4cfef9ecf…)NestedJIT shrink
lib/JIT/Builtin/PasswordRandomBytesRuntime.php: 129 → 104 lines — deleted hand-rolledNestedJitCompileScope::run+parseAndCompile+new JIT(); nowJitVmHelperLink::ensureCompiled- Inventory warnings for PasswordRandomBytesRuntime: 3 → 1
Merged via #22317.
Verification
Command Result vendor/bin/phpunit test/unit/PasswordRandomBytesRuntimeShrinkTest.phpOK (3 tests, 11 assertions) vendor/bin/phpunit test/unit/PasswordCryptoRuntimeShrinkTest.phpOK (7 tests) make bootstrap-selfhost-vm-driver-execute-probeOK make north-star5-verify-fastOK (fast) php script/bootstrap-inventory.php --checkOK 6415/6415 php script/check-bootstrap-gen0-manifest-sync.phpOK NestedJIT shrink
lib/JIT/Builtin/PasswordRandomBytesRuntime.php: 129 → 104 lines — deleted hand-rolledNestedJitCompileScope::run+parseAndCompile+new JIT(); nowJitVmHelperLink::ensureCompiled- Inventory warnings for PasswordRandomBytesRuntime: 3 → 1
- added a commit that references this issue
on Jul 22, 2026
Metadata
Metadata
Assignees
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITenhancementNew feature or requestNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevExPhase 0 – foundation & DevEx
Category
php-in-php· runtime-shrink (#1492, peer #22300 FtokRuntime / #22256 StringStrcoll)Problem
lib/JIT/Builtin/PasswordRandomBytesRuntime.phpstill hand-rollsNestedJitCompileScope::run+parseAndCompile+new JIT()forRandomBytesJitHelper.php. Peer runtimes route helper compile throughJitVmHelperLink::ensureCompiledfor consistent user-script env clearing, insert-block restore, and helper-runtime cache.StringRandomBytesalready usesJitVmHelperLink::ensureBridgefor the publicrandom_bytesABI (#21186); this password-hash nested path should match.php-src reference
PHP_FUNCTION(random_bytes)(semantics unchanged; compile-path only)PHP implementation target
lib/JIT/Builtin/PasswordRandomBytesRuntime.php— replaceensureJitHelperCompiledbody withJitVmHelperLink::ensureCompiled; uselookupCompiled; drop unuseduse NestedJitCompileScope/use JITtest/unit/PasswordRandomBytesRuntimeShrinkTest.php— guardJitVmHelperLink::ensureCompiled, no hand-rolledNestedJitCompileScope::run/parseAndCompile/new JIT(Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/unit/PasswordRandomBytesRuntimeShrinkTest.php' make bootstrap-selfhost-vm-driver-execute-probeDone when
PasswordRandomBytesRuntimeusesJitVmHelperLink::ensureCompiledonlymake bootstrap-selfhost-vm-driver-execute-probegreenRefs #1492, #9275, #22300, #22256, #21186