ext/opcache: Fix GH-23679 tracing JIT shadowed private writes - #23683
Open
iliaal wants to merge 1 commit into
Open
ext/opcache: Fix GH-23679 tracing JIT shadowed private writes#23683iliaal wants to merge 1 commit into
iliaal wants to merge 1 commit into
Conversation
zend_get_known_property_info treated a ZEND_ACC_CHANGED public property as the known offset even when the executing scope owned a private property of the same name, so tracing JIT wrote through a child's public slot. Returning NULL uses the runtime-cache path, which already goes through zend_get_property_offset. FETCH_OBJ_W, ASSIGN_OBJ, INC, and ASSIGN_OBJ_OP share the helper; $this access, child methods, and unshadowed or protected-to-public properties do not hit this arm. Fixes phpGH-23679
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.
Tracing JIT specialised $clone->prop writes in a parent method to a child's public property of the same name (ZEND_ACC_CHANGED). zend_get_known_property_info now refuses that known-offset path when the executing scope is not the object's class, so the runtime cache populated by zend_get_property_offset is used instead. FETCH_OBJ_W, ASSIGN_OBJ, INC, and ASSIGN_OBJ_OP share the helper; $this access, child methods, and unshadowed properties do not. Fixes #23679