Skip to content

Compiler SIGSEGV: ++/-- lowering crashes on null locals and under the FunctionStatic phpunit filter #16565

Description

@PurHur

Summary

Two related pre-existing segfaults (rc=139) in the compiler process itself, both surviving #16564 (verified identical with and without it):

  1. ./phpc build on:
<?php
$x = null; echo ++$x, "|"; $y = null; $y--; var_dump($y);

crashes the compiler (no diagnostics, core dump). VM output is correct (1|NULL).

  1. vendor/bin/phpunit --filter 'FunctionStatic|TypedFunctionStatic' segfaults mid-suite in the pinned container (after the static_closure_init cases).

Environment

php-compiler:22.04-dev (PHP 8.2.31 + LLVM 9 FFI).

Notes

  • Likely the same underlying crash in ++/-- lowering via FFI (both paths exercise incdec on null/boxed operands).
  • Blocks trusting the FunctionStatic phpunit battery as a gate; targeted per-test runs pass.

Done when

  • Both repros exit cleanly (build succeeds or fails with a diagnostic; phpunit filter completes)
  • AOT output for repro 1 matches VM (1|NULL)

🤖 Generated with Claude Code

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

    area:compilerCompiler / CFG / JITbugSomething isn't workingphase-3:aotPhase 3 – AOT deployment

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions