Skip to content

Stdlib: fix AOT cos()/cosh() NestedJIT returning 0 (#27005) - #27061

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-27005-aot-cos-cosh
Aug 2, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/stdlib-27005-aot-cos-cosh

Conversation

@PurHur

@PurHur PurHur commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #27005

Test plan

  • ./script/docker-exec.sh -- bash -lc 'php bin/compile.php -o /tmp/aot_cos test/repro/issue_27005_aot_cos_cosh.php && /tmp/aot_cos' → 1\n1
  • Repeat 10/10 on built binary
  • VM + JIT match Zend on same repro
  • ./script/phpunit.sh --filter 'CosRuntimeShrinkTest|HyperbolicRuntimeShrinkTest' → OK (18 tests, 2 skipped host kernel)
  • php script/bootstrap-inventory.php --check → OK 6823/6823
  • php script/check-selfhost-spine-coverage-sync.php → OK

Verification transcript

aot=1
1
repeat=10/10
jit=1
1
vm=1
1
zend=1
1

Made with Cursor

CosJitHelper/CoshJitHelper called VmMath which NestedJIT stubs to null→0.
Mirror ceil/sqrt: libc leaf kernels + NestedJitCompileScope short-circuit,
refresh helper-runtime units.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 7de7e9f into master Aug 2, 2026
0 of 2 checks passed
@PurHur
PurHur deleted the agent/stdlib-27005-aot-cos-cosh branch August 2, 2026 21:15
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.

Regression: AOT cos() returns 0 — VM/JIT match Zend (ext/standard/math.c)

1 participant