Skip to content

AOT: hash_pbkdf2() rejects invalid iterations/length with ValueError (#12230) - #36059

Merged
PurHur merged 1 commit into
masterfrom
fix/hash-pbkdf2-aot-iterations-12230
Aug 31, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/hash-pbkdf2-aot-iterations-12230

Conversation

@PurHur

@PurHur PurHur commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #12230

Test plan

./script/aot-smoke.sh
# aot-smoke: 8 passed, 0 failed

./script/phpunit.sh --filter HashPbkdf2Iterations12230AotTest
# OK (2 tests, 8 assertions)

./script/phpunit.sh --filter HashPbkdf2Reflection25469AotTest
# OK (1 test, 5 assertions)

./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_hash_pbkdf2_iterations_valueerror.php'
./script/docker-exec.sh -- bash -lc 'tmp=/tmp/hk; php bin/compile.php -o "$tmp" test/repro/maintainer_gap_hash_pbkdf2_iterations_valueerror.php && "$tmp"'
# both print ok / exit 0

Not run: full compliance suite, differential sweep (no lowering shape change beyond guard blocks).

Made with Cursor

…12230).

VM execute() already validated; JIT call() and HashCryptoJitHelper did not.
Add runtime IR guards and helper-runtime checks matching ext/hash/hash_pbkdf2.c.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 643126a into master Aug 31, 2026
1 check passed
@PurHur
PurHur deleted the fix/hash-pbkdf2-aot-iterations-12230 branch August 31, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: hash_pbkdf2() iterations ≤0 / length <0 — returns empty string not ValueError (ext/hash/hash_pbkdf2.c)

1 participant