Skip to content

Regression: AOT hexdec()/bindec() compile fails — Current basic block has no parent function (ext/standard/math.c) #26884

Description

@PurHur

Category

bug · php-src-strict · stdlib · user-script AOT · pillar 4

Problem

hexdec('ff') / bindec('1010') match Zend on VM/JIT (255 / 10), but thin AOT fails at compile with:

Current basic block has no parent function (exit 2)

Probed 2026-08-02 @ bb3571d82.

Repro Zend / VM / JIT AOT (2026-08-02)
hexdec('ff') 255 compile fail
bindec('1010') 10 compile fail (same lowering)

php-src reference

PHP implementation target

Repro

./script/docker-exec.sh -- bash -lc '
cat > /tmp/issue_hexdec_aot.php <<'"'"'PHP'"'"'
<?php
echo hexdec("ff"), "\n";
echo bindec("1010"), "\n";
PHP
php /tmp/issue_hexdec_aot.php
php bin/vm.php /tmp/issue_hexdec_aot.php
php bin/jit.php /tmp/issue_hexdec_aot.php
php bin/compile.php -o /tmp/issue_hexdec_aot /tmp/issue_hexdec_aot.php; echo compile_exit:$?
'

Done when

  • AOT builds and prints 255 / 10 matching Zend/VM/JIT
  • Unit/AOT compile+execute guard for hexdec/bindec
  • 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