Skip to content

ext/opcache: Fix GH-23679 tracing JIT shadowed private writes - #23683

Open
iliaal wants to merge 1 commit into
php:PHP-8.5from
iliaal:fix/gh-23679-shadowed-private-property
Open

ext/opcache: Fix GH-23679 tracing JIT shadowed private writes#23683
iliaal wants to merge 1 commit into
php:PHP-8.5from
iliaal:fix/gh-23679-shadowed-private-property

Conversation

@iliaal

@iliaal iliaal commented Sep 13, 2026

Copy link
Copy Markdown
Member

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracing JIT: writes to a parent's private property land in a child's shadowing public property

1 participant