Category
bootstrap
Milestone
M5 (honest CLI / bin/compile.php native emit) — parent #1492. Related #2880, #2900, #2114 (try/catch JIT phase 2).
Problem
Bootstrap probes that host-compile src/cli_driver.php for the m3 emit TU log a non-fatal sidecar failure:
m3-emit-tu sidecar host-compile failed: exit=255 source=…/src/cli_driver.php
RuntimeException: Module verification failed due to Referring to a basic block in another function!
br label %try_catch_dispatch
Stack: JIT\TryCatchHelper::buildDispatch() → JIT\Context::compileCommon → Runtime::standalone → cli_driver.php run().
Inventory argv / gen-3 paths may still pass, but BOOTSTRAP_M5_DRIVER_HOST_FULL_CLI=1 and honest single-TU bin/compile.php sidecars remain blocked.
php-src reference
N/A (LLVM IR invariant). Analogous to LLVM rule: terminators may only target basic blocks in the same function.
Repro
docker info >/dev/null
./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-driver-smoke 2>&1 | grep -A3 try_catch_dispatch'
Full gate:
BOOTSTRAP_M5_DRIVER_HOST_FULL_CLI=1 ./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-driver-host-compile'
Today: exit 255 + Referring to a basic block in another function. Done when: sidecar host-compile succeeds, verify clean.
Scope
| Path |
Work |
lib/JIT/TryCatchHelper.php |
buildDispatch() — try_catch_dispatch BB must be function-local or shared via llvm::BasicBlock in common helper with correct parent Function* |
lib/JIT/Context.php |
Run module verify before compileToFile (~line 570) in dev builds |
src/cli_driver.php |
Minimal repro TU containing try/catch on CLI path |
Not: VM-only try/catch without fixing JIT; internal_* PHP shims.
Done when
Verification
./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-driver-smoke bootstrap-selfhost-link'
Related
Labels
bootstrap, implementation-ready, MOST IMPORTANT, phase-0:Foundation
Category
bootstrapMilestone
M5 (honest CLI /
bin/compile.phpnative emit) — parent #1492. Related #2880, #2900, #2114 (try/catch JIT phase 2).Problem
Bootstrap probes that host-compile
src/cli_driver.phpfor the m3 emit TU log a non-fatal sidecar failure:Stack:
JIT\TryCatchHelper::buildDispatch()→JIT\Context::compileCommon→Runtime::standalone→cli_driver.phprun().Inventory argv / gen-3 paths may still pass, but
BOOTSTRAP_M5_DRIVER_HOST_FULL_CLI=1and honest single-TUbin/compile.phpsidecars remain blocked.php-src reference
N/A (LLVM IR invariant). Analogous to LLVM rule: terminators may only target basic blocks in the same function.
Repro
Full gate:
BOOTSTRAP_M5_DRIVER_HOST_FULL_CLI=1 ./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-driver-host-compile'Today: exit 255 +
Referring to a basic block in another function. Done when: sidecar host-compile succeeds, verify clean.Scope
lib/JIT/TryCatchHelper.phpbuildDispatch()—try_catch_dispatchBB must be function-local or shared viallvm::BasicBlockin common helper with correct parentFunction*lib/JIT/Context.phpcompileToFile(~line 570) in dev buildssrc/cli_driver.phpNot: VM-only try/catch without fixing JIT;
internal_*PHP shims.Done when
m3-emit-tu sidecar host-compileforcli_driver.phpsucceeds (LLVM module verify clean)BOOTSTRAP_M5_DRIVER_HOST_FULL_CLI=1 make bootstrap-selfhost-driver-host-compileexits 0php script/bootstrap-inventory.php --checkstill green after fixtest/unit/TryCatch*/ compliance try/catch PHPTsVerification
./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-driver-smoke bootstrap-selfhost-link'Related
Labels
bootstrap,implementation-ready,MOST IMPORTANT,phase-0:Foundation