Bootstrap: C-floor trivial-echo gen-0 functional smoke (#26756) - #26778
Conversation
|
WIP handoff: functional smoke not green yet — see #26756 comment. Do not merge until |
Progress (lane B) — NestedJIT allowlist + diagnostic stubs; blocked on Runtime::parse IR verifyPushed on
Verified:
Current blocker (repro): ./script/docker-exec.sh -- bash -lc './script/bootstrap-gen0-refresh-argv-driver.sh'
# last progress=jit_context_verify_begin
# last entry=PHPCompiler\Runtime::parse
# Module verification: parentless instructions + "Terminator found in the middle of a basic block" (block_124/141/157)Next step: fix IR shape of host-lowered PR: #26778 |
|
Maintainer triage (2026-08-02): hold merge.
Rebase/resolve conflicts, publish a seed that can |
|
Maintainer triage (2026-08-02 @ 29807d1): holding merge.
|
Maintainer triage 2026-08-02Do not merge — |
|
Maintainer triage (2026-08-02): leaving open — do not merge yet. PR checklist still has functional smoke / argv-only gen-0 refresh pending ( Continue the protected harness refresh; merge only after committed |
|
Maintainer triage (2026-08-02): leaving open — do not merge yet. PR body correctly blocks on |
|
Maintainer triage 2026-08-02: leaving unmerged per PR test plan — functional smoke on committed Will re-review when |
|
Maintainer triage 2026-08-02: leaving open (no merge).
|
|
Maintainer triage (2026-08-02): holding merge.
Re-request review when argv snap publishes and |
|
Maintainer triage (2026-08-02): still CONFLICTING, and the PR body correctly says do not merge until |
|
Maintainer triage (2026-08-02): leaving unmerged per PR body — functional smoke on committed Note: |
|
Maintainer triage (2026-08-02): holding merge. TRY_FIRST (this workspace,
|
| Gate | Status | Note |
|---|---|---|
docker info |
green | OK |
php script/bootstrap-inventory.php --check |
partial | doc drift (PregQuoteJitHelper method flags) — regenerate docs/bootstrap-inventory.md |
./script/release-readiness.sh --json |
mixed | north-star5-fast / vm-driver-probe ok; gen0_provenance stale (9e6b9c12a, 47d, 7837 lowering commits, unverified-restamp) |
| PR mergeability | DIRTY / CONFLICTING | needs rebase onto master |
This PR
Still correctly self-blocks on make bootstrap-gen0-driver-functional-smoke against the committed prelinked/bootstrap-gen0/bin-compile-aot seed. Do not merge wiring-only progress or restamp the seed to clear #26756 / re-#23468.
Re-request review when: conflicts resolved, argv snap publishes, and functional smoke is green on the committed sidecar.
|
Maintainer triage 2026-08-02: not merging.
Please rebase, finish argv-only refresh, and re-request review with smoke output pasted. |
Verification (tip
|
Maintainer triage (2026-08-02)Not merging — agrees with the PR body: functional smoke on committed Local TRY_FIRST on
Please keep WIP until |
|
Maintainer triage (2026-08-02,
Re-request review when argv snap is published and functional smoke output is pasted. |
Helper-unit emit of ResolveSidecarJitHelper fails without phpc_str_replace under NestedJitCompileScope, so initParsePipeline NestedJIT of resolveDockerBuildPrefix blows IR for tens of minutes. Identity path stubs are enough for gen-0 functional smoke (live never-seen paths). Co-authored-by: Cursor <cursoragent@cursor.com>
Host-lowering initParsePipeline hung the Zend rebuild; keep native RuntimeEmitTuInit / void stubs and real-lower parse (+ compile) only. Co-authored-by: Cursor <cursoragent@cursor.com>
The emit-spine skip list alone still left isM3CompileDriverRealLoweringName returning true, so NestedJIT host-lowered initParsePipeline and hung the argv-driver Zend rebuild for hours. Co-authored-by: Cursor <cursoragent@cursor.com>
After skipping initParsePipeline, ensureM3EmitTuEmitBridgeSpineSymbols still host-lowered noteParseCompileNullForScript with no spine-stub handler. Emit void/null/identity stubs for the M5 diagnostic and preprocess methods. Co-authored-by: Cursor <cursoragent@cursor.com>
Only stub diagnostics / preprocess / compileEmitSmoke; prepare still comes from Runtime.php like the inventory argv preprocess path (#11809). Co-authored-by: Cursor <cursoragent@cursor.com>
Host-lowering Runtime::parse mid argv compile left parentless LLVM instructions at module verify; isolate builder/block maps like other NestedJIT. Co-authored-by: Cursor <cursoragent@cursor.com>
Skip TypedPropertyUninitGuard CFG splits on M5_DRIVER_HOST and stop entryAlloca from splicing before an existing terminator. Re-enable real initParsePipeline lowering so the seed keeps a live parser; ResolveSidecar identity stubs still avoid the NestedJIT hang on that path. Co-authored-by: Cursor <cursoragent@cursor.com>
NestedJIT of the PHP CFG hung Zend argv rebuilds for hours on a single method. Mirror RuntimeInitCompiler with allocate+markConstructed so the seed keeps non-null parse-spine fields without NestedJIT fan-out. Co-authored-by: Cursor <cursoragent@cursor.com>
Re-apply PR M5 force-real-lower / ResolveSidecar identity stubs after a bad tree overwrite, and keep RuntimeInitParsePipeline C-floor so NestedJIT of initParsePipeline cannot hang the argv Zend rebuild. Co-authored-by: Cursor <cursoragent@cursor.com>
NestedJIT and const-string init left insert cleared/sealed so string literal + strcmp IR became parentless and module verify failed. Restore via BasicBlockHelper, reuse the last open BB, and guard load/compare paths so argv Zend rebuild produces a driver (functional smoke still segfaults on shallow C-floor parser). Co-authored-by: Cursor <cursoragent@cursor.com>
…26756) Sealed-insert ensureOpenInsertBlock was still appending orphan jit_strcmp blocks; resume lastOpenBasicBlock instead. Stop inventory void-stub from winning over RuntimeInitParsePipeline C-floor under M5_DRIVER_HOST so the argv seed no longer ships a 1-byte ret for initParsePipeline. Co-authored-by: Cursor <cursoragent@cursor.com>
SELFHOST_AOT stripped Runtime parse-spine property slots so C-floor
initParsePipeline stores were invisible and parse SEGV on null; under
M5_DRIVER_HOST define the full slot set. Replace void prepare/preprocess/
rewrite stubs (registered from {main}'s Block) with identity LLVM stubs
so host-lowered parse keeps a real [$code, []] / $code ABI.
Co-authored-by: Cursor <cursoragent@cursor.com>
C-floor sets m5ArgvIdentityParsePrepare so host-lowered Runtime::parse keeps the source string instead of unpacking identity-stub prepare returns that SEGV in __string__separate after setStringAt. Co-authored-by: Cursor <cursoragent@cursor.com>
NestedJIT M5 argv lowered parse with __value__* formals while callers pass __string__* from file_get_contents (module verify fail). Force string ABI and keep prepare identity without __string__separate. Co-authored-by: Cursor <cursoragent@cursor.com>
With __string__* formals forced, re-enable m5ArgvIdentityParsePrepare so host-lowered parse keeps $code and avoids the identity-stub list-unpack SEGV. Co-authored-by: Cursor <cursoragent@cursor.com>
Prepare-skip CFG widens $code beyond TYPE_STRING so the rawType guard missed; use declared string + Type::string() for NestedJIT M5 argv. Co-authored-by: Cursor <cursoragent@cursor.com>
Property-gated prepare skip under NestedJIT caused terminator-in-middle-BB verify failures. Keep __string__* formal force + prepare identity without separate; C-floor still sets m5ArgvIdentityParsePrepare for a future C-floor parse path. Co-authored-by: Cursor <cursoragent@cursor.com>
Host-lowered parse list-unpacked prepare into exit 139 after c:main_before_php; nm showed no PHPCfg\Parser in the argv driver and compileEmitSmoke was a 3-byte null stub. Emit C-floor parse under M5_DRIVER_HOST and prefer compile in parseAndCompile so smoke fails with parseAndCompile-returned-null instead of segfault. Next: NestedJIT PHPCfg\Parser::parse into the module. Co-authored-by: Cursor <cursoragent@cursor.com>
…26756) C-floor Runtime::parse can call Parser::parse when the symbol exists; wire ensureParse before the null floor so gen-0 rebuilds can pull vendor Parser into the module (soft-fail / opt-out via M5_FORCE_PARSER_NESTEDJIT=0). Co-authored-by: Cursor <cursoragent@cursor.com>
Default FORCE_PARSER_NESTEDJIT left mid-BB terminators and failed argv refresh verify; keep the hook but require =1 to experiment. FORCE=0 rebuild still produces ~32MB driver with honest parseAndCompile null. Co-authored-by: Cursor <cursoragent@cursor.com>
…26756) Host-verified M5TrivialEchoScript builds a PHPCompiler\Block matching compileEmitSmoke for `echo "TOKEN\n";` without PHPCfg\Parser. Wire emitRuntimeParseAndCompileDefault to prefer NestedJIT'd parseAndCompile when registered; keep NestedJIT opt-in (PHP_COMPILER_M5_TRIVIAL_ECHO_NESTEDJIT) — default NestedJIT hangs at runtime in the argv driver (same class as Parser). Next: pure C-floor parseAndCompile (no NestedJIT of the PHP helper body). Co-authored-by: Cursor <cursoragent@cursor.com>
…smoke (#26756) NestedJIT of M5TrivialEchoScript hangs in the argv driver; emit a pure LLVM scanner + POSIX printf shebang standalone path instead, refresh the committed seed, and default-on BOOTSTRAP_GEN0_DRIVER_FUNCTIONAL_GATE. Co-authored-by: Cursor <cursoragent@cursor.com>
ensureOpenInsertBlock must append a fresh block when insert is sealed; jumping to an unrelated open BB caused terminator-in-middle on hello-world AOT (bisect abcfd80e6). Also cover six inventory spine units from master. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop deferred PregJitHelperThinAot from the literal spine bundle and refresh tracker footnotes so coverage/deferred/count gates match inventory. Co-authored-by: Cursor <cursoragent@cursor.com>
87a0eed to
215cc7e
Compare
#26988) * Bootstrap: refresh DateTimeFormat helper-runtime; drop FileGetContents orphan (#26756) Re-emit DateTimeFormatJitHelper after BB fix; prune FileGetContentsJitHelper prelinked unit now that HELPER_PATH registration was removed for libc kernel. Co-authored-by: Cursor <cursoragent@cursor.com> * Bootstrap: refresh gen-0 argv fingerprint after #26778 merge Argv-driver rebuild with functional smoke + build receipt so manifest lowering_source_fingerprint matches live sources (no restamp). Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
echo "…"scripts.M5TrivialEchoNative(no NestedJIT ofM5TrivialEchoScript— that hung at runtime).printfshebang (no hostcc); functional smoke green on committed seed.BOOTSTRAP_GEN0_DRIVER_FUNCTIONAL_GATE=1; argv-only build receipts accepted after smoke.php-src reference
N/A — bootstrap seed honesty (php-compiler-strict).
PHP implementation
lib/JIT/M5TrivialEchoNative.php— C-floor parseAndCompile + emitlib/JIT.phpunderM5_DRIVER_HOST(default; NestedJIT remains opt-in)script/bootstrap-gen0-refresh-argv-driver.sh+ receipt lib for argv-only provenanceTest plan
vendor/bin/phpunit --filter M5TrivialEchoScriptTest— OK./script/docker-exec.sh -- bash -lc 'timeout 600 ./script/bootstrap-gen0-refresh-argv-driver.sh'— OK, published seedmake bootstrap-gen0-driver-functional-smoke/ hostbash script/bootstrap-gen0-driver-functional-smoke.sh— OKphp script/check-selfhost-spine-coverage-sync.php— OKnorth-star5-verify --strictnot required for this argv-seed refreshVerification paste