Repository navigation
Conversation
Co-authored-by: mlenarciak <39970740+mlenarciak@users.noreply.github.com>
LamentXU123
approved these changes
Nov 8, 2026
ndossche
approved these changes
Nov 8, 2026
ndossche
left a comment
Member
There was a problem hiding this comment.
Yeah normally in these places for the JIT/Optimizer we check for the linked flag, but apparently this was forgotten here
opensource-fork-sync Bot
pushed a commit
to cla7aye15I4nd/opensource-php__php-src
that referenced
this pull request
Nov 8, 2026
* PHP-8.5: Fix phpGH-25253: JIT reads parent of an unlinked class (php#25259)
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.
zend_get_known_class()followsce->parentforparent::without checkingZEND_ACC_LINKED, so for a class whose parent lives in another file it readsparent_nameas a class entry. The check after it rarely saves us: the persisted string has refcount 2, sotypereads asZEND_USER_CLASS, and once the interned strings buffer is full the string is copied into the script's own shm, where the word atinfo.user.filenamecan be this script's filename. Thenzend_hash_find()runs on garbage. The fix checks the flag first, like the optimizer already does. The test usesopcache.interned_strings_buffer=0to get the same layout and segfaults without the fix.Fixes #25253