Skip to content

Self-host M5: MCJIT execute blocks honest bootstrap loop (track on M5 epic) #8721

Description

@PurHur

Category

bootstrap | runtime

Problem

bin/jit.php -r '...' SIGSEGV during MCJIT execute (#98) blocks LLVM-assisted bootstrap experiments and erodes confidence that JIT paths can participate in self-host verification. Bootstrap probes today rely on VM/AOT; JIT crash prevents honest -r smoke on compiler sources and blocks JIT-only builtins from bootstrap iteration.

php-src reference: N/A (compiler runtime). LLVM MCJIT execute is project-owned (lib/JIT.php, bin/jit.php).

Repro

./script/docker-exec.sh -- bash -lc 'php bin/jit.php -r "echo 1;"'
# Observed: SIGSEGV / exit 139 (issue #98)

Compare VM baseline (must pass):

./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r "echo 1;"'

Bootstrap impact:

Scope

  • bin/jit.php MCJIT execute entry
  • lib/JIT.php module init / symbol resolution for -r one-shot units
  • test/compliance/ JIT smoke guard once execute is stable
  • Document bootstrap policy: no Zend JIT fallback in self-host probes

Done when

  • php bin/jit.php -r 'echo 1;' exits 0 on Docker CI image (php-compiler:22.04-dev)
  • Minimal JIT compliance case added (guards re-close CI: Run JIT compliance tests in CI (fix LLVM skip in PHPUnit) #98)
  • docs/bootstrap-selfhost.md notes JIT -r as available for probes (or explicit remaining limits)
  • No new C runtime logic — fix in PHP JIT lowering / LLVM link only

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions