php-in-php: drop always-on LibcExtern strtol (#31988) - #31989
Merged
Conversation
…ocal (#31988) Remove libc strtol(3) from the always-on LibcExtern table; NestedJIT numeric-parse leaves now call ensureStrtolDecl() before lookup. Drops Module::jitInit fallback and routes HashTable through the shared helper. Co-authored-by: Cursor <cursoragent@cursor.com>
Closed
4 tasks
Merged
2 tasks
PurHur
added a commit
that referenced
this pull request
Aug 18, 2026
…nction-static (#31966) (#32005) 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: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
added a commit
that referenced
this pull request
Aug 18, 2026
…ray prop (#31967) (#32011) Finish remaining #31967 lowering after numeric-string/NAN merge (#31981): enum case class constants, $obj::method(), interface self:: in const expr, and non-empty array static property defaults. Fix #31989 strtol ensureStrtolDecl() parse regression that blocked all AOT compiles. php-src: Zend/zend_enum.c, zend_execute.c (INIT_STATIC_METHOD_CALL), zend_inheritance.c, zend_compile.c (static prop defaults). Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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
strtol(3)from the always-onLibcExterntable (peer php-in-php: drop always-on LibcExtern strcmp after NestedJIT module-local (#31954 shape) #31971 strcmp / php-in-php: drop always-on LibcExtern memcmp after NestedJIT module-local (#31885 shape) #31954 memcmp).LibcExtern::ensureStrtolDecl(); ~19 NestedJIT numeric-parse leaves call it beforelookupFunction('strtol').Module::jitInitalways-on strtol fallback; routeHashTable::ensureLibcStrtol()through the shared helper.C runtime shrink: 1 always-on row removed from
lib/JIT/LibcExtern.php; 12 lines of duplicate module-local decl logic removed fromHashTable.php+Module.php.Closes #31988
Test plan
./script/phpunit.sh --filter 'LibcExternDeadDeclsRuntimeShrinkTest|StrtolRuntimeShrinkTest'Output:
./script/docker-exec.sh -- bash -lc 'php -l lib/JIT/LibcExtern.php && php -l ext/standard/JitChr.php'Output:
Not run: differential sweep (no user-visible strtol/intval behavior change), full compliance suite.
Made with Cursor