Category
bug · php-src-strict · stdlib · user-script AOT · pillar 4
Problem
password_hash(..., PASSWORD_BCRYPT, ['cost' => 4]) + password_verify match Zend on VM and JIT (ok / ok), but user-script AOT builds then segfaults at run time (fatal signal after c:main_before_php, exit 139). Reproduced 3/3 runs on the same binary — not intermittent.
Prior closed AOT gap #26773 was PASSWORD_ARGON2ID LLVM verify / dominate-uses; this is the bcrypt path segfaulting after a successful link.
Probed 2026-08-02 @ d72ac27fd.
| Repro |
Zend / VM / JIT |
AOT (2026-08-02) |
password_hash('secret', PASSWORD_BCRYPT, ['cost'=>4]) + verify |
ok / ok |
build OK (~25 MB); run exit 139 ×3 |
php-src reference
PHP implementation target
ext/standard/ password helpers + lib/JIT/Builtin/ password lowering — AOT must not leave a null/broken crypto trampoline; prefer PHP-in-PHP / existing VmPassword path over new runtime/*.c
- Confirm thin AOT execute links the same helper as JIT (no VmClosureCall-style stub)
Repro
./script/docker-exec.sh -- bash -lc '
cat > /tmp/issue_pwd_aot.php <<'"'"'PHP'"'"'
<?php
$h = password_hash("secret", PASSWORD_BCRYPT, ["cost" => 4]);
echo password_verify("secret", $h) ? "ok" : "bad", "\n";
echo password_verify("wrong", $h) ? "bad" : "ok", "\n";
PHP
php /tmp/issue_pwd_aot.php
php bin/vm.php /tmp/issue_pwd_aot.php
php bin/jit.php /tmp/issue_pwd_aot.php
php bin/compile.php -o /tmp/issue_pwd_aot /tmp/issue_pwd_aot.php
/tmp/issue_pwd_aot; echo exit:$?
'
Done when
Category
bug· php-src-strict · stdlib · user-script AOT · pillar 4Problem
password_hash(..., PASSWORD_BCRYPT, ['cost' => 4])+password_verifymatch Zend on VM and JIT (ok/ok), but user-script AOT builds then segfaults at run time (fatal signal after c:main_before_php, exit 139). Reproduced 3/3 runs on the same binary — not intermittent.Prior closed AOT gap #26773 was
PASSWORD_ARGON2IDLLVM verify / dominate-uses; this is the bcrypt path segfaulting after a successful link.Probed 2026-08-02 @
d72ac27fd.password_hash('secret', PASSWORD_BCRYPT, ['cost'=>4])+ verifyok/okphp-src reference
ext/standard/password.c—php_password_hash/ bcryptext/standard/password.stub.phpPHP implementation target
ext/standard/password helpers +lib/JIT/Builtin/password lowering — AOT must not leave a null/broken crypto trampoline; prefer PHP-in-PHP / existing VmPassword path over newruntime/*.cRepro
Done when
ok/okmatching Zend/VM/JIT (no segfault)script/differential-sweep.sh --aot --repeat 3equivalent) — all matchtest/covering bcryptpassword_hash+password_verifyAOT execute