Skip to content

Fix M2 lib spine VM smoke gate (#1846) - #2597

Merged
PurHur merged 1 commit into
masterfrom
fix/m2-vm-spine-smoke-1846
May 26, 2026
Merged

Fix M2 lib spine VM smoke gate (#1846)#2597
PurHur merged 1 commit into
masterfrom
fix/m2-vm-spine-smoke-1846

Conversation

@PurHur

@PurHur PurHur commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Restores PHP_COMPILER_VM_SPINE_SMOKE dispatch in compiler_lib_spine_smoke/main.php (removed in CI: COALESCE_COMPLIANCE_GATE default-on in ci-fast (audit + close #99) #1960 when vm_run_smoke broke native link).
  • Guards getenv('PHP_COMPILER_VM_SPINE_SMOKE') with is_string() so native AOT does not segfault when the variable is unset (false vs string compare).
  • Adds lib/JIT/VmSpineSmokeNative.php and a lib/JIT.php hook to LLVM-lower vm_run_smoke() under PHP_COMPILER_SELFHOST_AOT without pulling the full Runtime parse spine (prep for wiring the call site back to vm_run_smoke()).

Test plan

  • BOOTSTRAP_LIB_SPINE_VM_SMOKE=1 make bootstrap-selfhost-lib-spine-vm-smoke (Docker)
  • make bootstrap-selfhost-lib-spine-smoke / link script prints compiler_lib_spine_smoke bundle OK
  • vendor/bin/phpunit --filter BootstrapLibSpineVmSmokeTest

Closes #1846 · advances #1492 M2 VM -r smoke.

Made with Cursor

Re-wire PHP_COMPILER_VM_SPINE_SMOKE dispatch in compiler_lib_spine_smoke
with a safe getenv() type guard (native AOT segfaults when comparing false
to string literals). Add VmSpineSmokeNative LLVM lowering for vm_run_smoke
so the bundled symbol does not pull Runtime parse spine into the link.

Verification: BOOTSTRAP_LIB_SPINE_VM_SMOKE=1 make bootstrap-selfhost-lib-spine-vm-smoke
Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit f22ba14 into master May 26, 2026
@PurHur
PurHur deleted the fix/m2-vm-spine-smoke-1846 branch May 26, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Self-host M2: native bin/vm.php -r smoke on compiler_lib_spine bundle

1 participant