Skip to content

Regression: AOT get_headers() compile fails — basic block has no parent (ext/standard/head.c) #27317

Description

@PurHur

Category

Stdlib · php-src-strict · AOT lowering

Problem

get_headers() matches Zend on VM/JIT (false for a refused loopback connection under @). AOT compile aborts with Current basic block has no parent function.

Repro Zend / VM / JIT (2026-08-03) AOT
@get_headers('http://127.0.0.1:1/') === false true compile fails

php-src reference

PHP implementation target

  • Fix AOT/JIT CFG parenting for get_headers lowering in ext/standard / lib/JIT (php-in-PHP helpers; no new C runtime logic)
  • Keep VM/JIT behavior unchanged

Repro

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_aot_get_headers.php'
./script/docker-exec.sh -- bash -lc 'php bin/jit.php test/repro/maintainer_gap_aot_get_headers.php'
./script/docker-exec.sh -- bash -lc 'php bin/compile.php test/repro/maintainer_gap_aot_get_headers.php -o /tmp/get_headers_aot'

AOT symptom:

Current basic block has no parent function

Done when

  • AOT build succeeds and binary prints true (same as Zend/VM/JIT for this refused-connection case)
  • Compliance or AOT fixture guard under test/compliance/cases/stdlib/ or test/fixtures/aot/
  • php-src-strict; no php-compiler-strict shortcut

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 workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions