Skip to content

Regression: AOT password_hash(PASSWORD_ARGON2ID) LLVM verify fail — dominate uses (ext/standard/password) #26773

Description

@PurHur

Category

bug · php-src-strict · ext/standard/password · user-script AOT · pillar 4

Problem

password_hash(..., PASSWORD_ARGON2ID, [...]) compiles and runs on VM/JIT (matches Zend) but AOT aborts at LLVM module verify with a dominance error on the options-cost phi. Probed 2026-08-02 @ b5715a3e2.

Repro Zend 8.2+ / VM / JIT AOT (2026-08-02)
password_hash('secret', PASSWORD_ARGON2ID, memory_cost=8,time_cost=1,threads=1) + verify ok / ok build: Instruction does not dominate all uses! on %pw_cost_* phi (Module->verify)

Open Reflection-only siblings (#24827, #25479) do not cover this AOT IR bug.

php-src reference

PHP implementation target

  • ext/standard / lib/JIT password_hash options lowering for AOT (cost/time/threads phi wiring)
  • PHP-in-PHP; no new runtime/*.c

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
cat > /tmp/pw.php <<'"'"'PHP'"'"'
<?php
$hash = password_hash("secret", PASSWORD_ARGON2ID, [
  "memory_cost" => 8, "time_cost" => 1, "threads" => 1,
]);
echo password_verify("secret", $hash) ? "ok\n" : "bad\n";
echo password_verify("no", $hash) ? "bad\n" : "ok\n";
PHP
php /tmp/pw.php
php bin/vm.php /tmp/pw.php
php bin/jit.php /tmp/pw.php
./phpc build -o /tmp/pw /tmp/pw.php && /tmp/pw
'

Also: test/repro/maintainer_gap_aot_password_hash_argon2id.php

Done when

  • AOT build succeeds and repro prints ok / ok
  • VM/JIT unchanged
  • AOT fixture or compliance guard
  • php-src-strict; no php-compiler-strict shortcut

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