Skip to content

M3: PHP_COMPILER_M3_COMPILE_DRIVER=1 link segfaults LLVM 9 during Runtime real lowering #1402

Description

@PurHur

Context

PR #1401 adds PHP_COMPILER_M3_COMPILE_DRIVER=1 / isM3CompileDriverRealLoweringName() hooks so the selfhost compile driver can eventually use real Runtime::parseAndCompile + standalone emit instead of Zend fallback (#1056).

Blocker

Linking test/selfhost/compiler_helloworld_smoke/compile_driver.php with PHP_COMPILER_M3_COMPILE_DRIVER=1 segfaults inside LLVM 9 (LLVMContext::shouldDiscardValueNames / Value::setName) while JIT-lowering the expanded Runtime/Compiler spine.

Without the flag, link succeeds but Runtime/helloworld paths remain stubs; runtime dispatch is gated behind PHP_COMPILER_M3_RUNTIME_COMPILE=1.

Goal

  • BOOTSTRAP_M3_COMPILE_DRIVER_REAL_LOWERING=1 ./script/bootstrap-selfhost-helloworld-probe.sh passes native compile (helloworld_compile_smoke: compile OK) without Zend emit fallback.
  • BOOTSTRAP_M3_HELLOWORLD_STRICT=1 green.

Notes

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions