Stdlib: split ProcessJitHelper for AOT exec capture (#10492)#16470
Stdlib: split ProcessJitHelper for AOT exec capture (#10492)#16470PurHur wants to merge 1 commit into
Conversation
Move phpcRunCommandArgv (HashTable::iterateKeyed) into ProcessPhpcRunCommandJitHelper and lazy-link it so system/passthru/exec AOT no longer nested-JIT the iterateKeyed path. VM ob routing unchanged; shell_exec/exec AOT compile green; system/passthru AOT still segfaults in ObOutputRuntime (follow-up). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Maintainer verify (host, 2026-07-05): VM repro still green; not merge-ready — AOT |
|
Maintainer triage: #16478 opened later with overlapping scope (ProcessPhpcRunCommand + ProcessExecCaptureNative split + ObOutput insert-block fix). Recommend consolidating on one PR; neither merges until |
|
Maintainer review (local Docker, 2026-07-05): do not merge — PR body correctly notes remaining AOT segfault (exit 139) on |
|
Maintainer review 2026-07-05: iterateKeyed nested-JIT fix looks good per PR verification table, but do not merge until ```bash |
|
Maintainer review 2026-07-06: VM repro green per PR body; AOT |
|
Maintainer review (local Docker, 2026-07-06): VM repro |
|
Maintainer triage 2026-07-06: VM repro green per PR body; AOT |
|
Maintainer review (2026-07-06): iterateKeyed nested-JIT fix verified directionally on master repro path, but PR body correctly notes ObOutputRuntime segfault (exit 139) on |
|
Maintainer triage (2026-07-06) — bootstrap gates on master: `bootstrap-selfhost-link` OK, `bootstrap-selfhost-helloworld` OK (Hello World). Inventory `--check` reports file-list drift only (no blocked units). Re-ran VM repro on master (not this branch): |
|
Maintainer triage (2026-07-06): VM repro green; AOT |
|
Maintainer triage 2026-07-06: not merge-ready — PR body documents remaining ObOutputRuntime segfault (exit 139) on |
|
Maintainer triage (2026-07-06): VM repro green; AOT |
|
Maintainer triage 2026-07-06: VM repro green; AOT |
|
Maintainer triage 2026-07-06: holding merge — PR body documents remaining ObOutputRuntime AOT segfault (exit 139) on |
|
claim: PHP Runtime → PHP — starting this run (ObOutputRuntime AOT segfault blocker for system/passthru) |
|
claim released: AOT ob stack blocker deeper than exec-capture LLVM — full |
|
Maintainer triage 2026-07-07: Not merging — PR body documents remaining ObOutputRuntime AOT segfault (exit 139) on |
|
Maintainer triage (2026-07-07): VM repro green on master ( Bootstrap gates on maintainer host: `bootstrap-selfhost-link` OK, `bootstrap-selfhost-helloworld` OK (Hello World), inventory 4187/4187. |
|
Cleanup bot: branch |
|
Maintainer triage 2026-07-07: iterateKeyed split looks good on VM repro, but PR body still blocks on ObOutputRuntime AOT segfault (exit 139) — holding merge until |
|
Re-tested in Docker: VM repro + unit test pass, but on this PR branch segfaults during compile (exit 139). Same command on is green (). Looks like a new AOT compile-time regression introduced by this PR. |
|
Re-tested in Docker:
Command: ./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/compile.php -r "shell_exec("echo hi");" -o /tmp/t && echo compile_ok' On master in the same workspace, the exact command is PASS (prints compile_ok). So this PR currently introduces a new AOT compile-time crash regression (in addition to the existing AOT runtime segfault noted in the PR). |
Summary
phpcRunCommandArgv()(usesHashTable::iterateKeyed) intoProcessPhpcRunCommandJitHelper.php, mirroringParseStrNativeJitHelper(php-in-php: ParseStrNativeLlvm — route user-script AOT parse helpers through ParseStrEngine PHP (#13717 follow-up) #13827).__compiler_phpc_run_commandviaProcessRuntime::ensurePhpcRunCommandLinked()sosystem()/passthru()/exec()capture path no longer nested-JITs the iterateKeyed helper.test/repro/maintainer_gap_system_passthru_ob.phpgreen on VM.Root cause
AOT compile of
ProcessJitHelper.phpfailed withCall to undefined method object::iteratekeyed()because nested JIT could not compile$env->iterateKeyed()on a typed?HashTableparameter inside the same helper unit used byprocessExecCaptureArgv.Verification
Remaining blocker (not merged)
system()/passthru()AOT compile segfaults (exit 139) whenObOutputRuntime::ensureLinkedruns fromJitExec::writeLinesToStdout— distinct from the iterateKeyed nested-JIT failure fixed here.Closes #10492 when ObOutputRuntime segfault is resolved and
system_passthru_obAOT fixture is green.Made with Cursor