Repository navigation
Stdlib: fix AOT cos()/cosh() NestedJIT returning 0 (#27005) - #27061
Merged
Merged
Conversation
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>
This was referenced Aug 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VmMath::cos/cosh→ NestedJIT stubs cross-class calls to null→0 under thin standalone AOT (same class as Regression: AOT ceil() returns 0 — VM/JIT match Zend (ext/standard/math.c) #27003 ceil / php-in-php: NestedJIT helper return ABI for double + __hashtable__* + string|false value-box (unblocks thin AOT always-helper) #20664 sqrt).phpc_cos_kernel/phpc_cosh_kernellibc leaves (JitCosKernel/JitCoshKernel), NestedJitCompileScope short-circuit inMathCos/MathCosh, refresh helper-runtime units.ext/standard/math.c—PHP_FUNCTION(cos)/PHP_FUNCTION(cosh).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./script/phpunit.sh --filter 'CosRuntimeShrinkTest|HyperbolicRuntimeShrinkTest'→ OK (18 tests, 2 skipped host kernel)php script/bootstrap-inventory.php --check→ OK 6823/6823php script/check-selfhost-spine-coverage-sync.php→ OKVerification transcript
Made with Cursor