Problem
M3 emit-helper translation units link, but native execute fails before AOT emit completes. Harness repro (May 2026):
script/apply-patches.sh
BOOTSTRAP_M3_LINK_COMPILE_DRIVER=1 \
BOOTSTRAP_M3_COMPILE_DRIVER_REAL_LOWERING=1 \
PHP_COMPILER_EMIT_HELPER_LINK=1 \
./script/bootstrap-m3-emit-tu-execute.sh
Observed:
runtime_compile_smoke_m3_emit: parseAndCompile returned null (CFG/compile spine)
runtime_compile_smoke_m3_emit: native emit failed at phase=parseAndCompile
HelloWorld probe still reports emit_path=zend partial with NEXT_LOWER: M3 emit TU runtime init.
Parent tracker #2442 covers emit-TU startup crash / execute; this issue owns the parseAndCompile null failure mode on the smallest emit entry first.
Goal
runtime_m3_emit_native_entry.php (then compile_smoke_m3_emit_native_entry.php, helloworld_m3_emit_native_entry.php) completes native emit:
runtime_compile_smoke_m3_emit: compile OK
emit_path=native
Strict gates (#1937, #1968) can follow once all three entries pass.
Implementation hints
| Piece |
Path |
Notes |
| Smallest TU |
test/bootstrap-aot/runtime_m3_emit_native_entry.php |
Bisect here first |
| Driver |
test/bootstrap-aot/runtime_compile_smoke_m3_emit.php |
Calls Runtime::parseAndCompile |
| JIT allowlist |
lib/JIT.php |
m3CompileDriverSpineDenyNames(), isM3CompileDriverRealLoweringName() |
| Runtime |
lib/Runtime.php |
Parser → CFG → Compiler path |
| Batch tracker |
#1768 |
Symbol allowlist growth (parallel) |
| Execute umbrella |
#2442 |
Link both ways; close together when probes green |
Suggested bisect order
runtime_m3_emit_native_entry.php — parseAndCompile null
compile_smoke_m3_emit_native_entry.php
helloworld_m3_emit_native_entry.php
make bootstrap-selfhost-helloworld → emit_path=native
Gates
| Gate |
Command |
| Emit-TU execute |
BOOTSTRAP_M3_LINK_COMPILE_DRIVER=1 BOOTSTRAP_M3_COMPILE_DRIVER_REAL_LOWERING=1 ./script/bootstrap-m3-emit-tu-execute.sh |
| HelloWorld partial |
make bootstrap-selfhost-helloworld |
| M3 strict |
BOOTSTRAP_M3_HELLOWORLD_STRICT=1 make bootstrap-selfhost-helloworld |
| M4 full loop |
make bootstrap-loop-probe (blocked until M3 strict) |
Done when
Repro (Docker)
./script/docker-exec.sh -- bash -lc '
script/apply-patches.sh
source script/php-env.sh
BOOTSTRAP_M3_LINK_COMPILE_DRIVER=1 \
BOOTSTRAP_M3_COMPILE_DRIVER_REAL_LOWERING=1 \
PHP_COMPILER_EMIT_HELPER_LINK=1 \
./script/bootstrap-m3-emit-tu-execute.sh
'
Links
Problem
M3 emit-helper translation units link, but native execute fails before AOT emit completes. Harness repro (May 2026):
Observed:
HelloWorld probe still reports
emit_path=zend partialwithNEXT_LOWER: M3 emit TU runtime init.Parent tracker #2442 covers emit-TU startup crash / execute; this issue owns the
parseAndCompilenull failure mode on the smallest emit entry first.Goal
runtime_m3_emit_native_entry.php(thencompile_smoke_m3_emit_native_entry.php,helloworld_m3_emit_native_entry.php) completes native emit:Strict gates (#1937, #1968) can follow once all three entries pass.
Implementation hints
test/bootstrap-aot/runtime_m3_emit_native_entry.phptest/bootstrap-aot/runtime_compile_smoke_m3_emit.phpRuntime::parseAndCompilelib/JIT.phpm3CompileDriverSpineDenyNames(),isM3CompileDriverRealLoweringName()lib/Runtime.phpCompilerpathSuggested bisect order
runtime_m3_emit_native_entry.php—parseAndCompilenullcompile_smoke_m3_emit_native_entry.phphelloworld_m3_emit_native_entry.phpmake bootstrap-selfhost-helloworld→emit_path=nativeGates
BOOTSTRAP_M3_LINK_COMPILE_DRIVER=1 BOOTSTRAP_M3_COMPILE_DRIVER_REAL_LOWERING=1 ./script/bootstrap-m3-emit-tu-execute.shmake bootstrap-selfhost-helloworldBOOTSTRAP_M3_HELLOWORLD_STRICT=1 make bootstrap-selfhost-helloworldmake bootstrap-loop-probe(blocked until M3 strict)Done when
bootstrap-m3-emit-tu-execute.shexits 0 (runtime entry first)make bootstrap-selfhost-helloworldreportsemit_path=nativewithout strict envRepro (Docker)
Links
docs/bootstrap-m5-fast-path.md