Skip to content

AOT: restore module verify for pow, base_convert, property_exists, function-static (#31966) - #32005

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-31966-aot-invalid-ir
Aug 18, 2026
Merged

AOT: restore module verify for pow, base_convert, property_exists, function-static (#31966)#32005
PurHur merged 1 commit into
masterfrom
agent/issue-31966-aot-invalid-ir

Conversation

@PurHur

@PurHur PurHur commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

php-src: Zend/zend_operators.c (pow_function), ext/standard/math.c (base_convert), ext/standard/class.c (property_exists). PHP implementation in lib/JIT/, ext/standard/JitPow.php, ext/standard/base_convert_.php, ext/standard/JitPropertyExists.php.

Closes #31966

Test plan

  • ./script/phpunit.sh --filter 'StrtolRuntimeShrinkTest|FunctionStaticRuntimeShrinkTest|PowIntRuntimeShrinkTest|MathBaseConvertRuntimeShrinkTest|PropertyExistsRuntimeShrinkTest|pow_operator_int_31966|base_convert_255_31966|property_exists_static_31966|function_static_string_write_31966'OK (33 tests, 204 assertions)
  • ./script/docker-exec.sh -- bash -lc 'php bin/compile.php -o /compiler/build/X test/repro/issue_31966_*.php && /compiler/build/X'

Verifier messages recorded (pre-fix):

  • 2 ** 10: parentless __phpc_pow_int call; then compute(i64,i64) vs __value__ helper ABI
  • base_convert: basic block in another function (mbc_invalid_radix_*)
  • property_exists: ret i64 0 into i1 function
  • function-static string: __value__writeString(%__value__*, %__string__**)

Post-fix AOT run (this branch):

var_dump(2 ** 10) → int(1024) rc=0
base_convert(255, 10, 2) → string(8) "11111111" rc=0
property_exists(C::class/'C', 'x') → bool(true) bool(true) rc=0
function-static `$s = 'z'` → z rc=0

Not run: ./script/ci-fast.sh, make north-star5-verify-fast, compliance suites (red on master; not a pass/fail signal).

Made with Cursor

…nction-static (#31966)

LLVM verify aborted these four probes after the #31989 strtol rewrite stole call results (parse error in HashTableWriteLlvm). Restore strtol Values, load __string__** before writeString, and keep NestedJIT helper results in the dest box Zend reads.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 54fe3ab into master Aug 18, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-31966-aot-invalid-ir branch August 18, 2026 02:01
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.

AOT: invalid IR — module verification fails for pow, base_convert, property_exists, function-static string write

1 participant