Skip to content

Commit 50bf2f7

Browse files
committed
fix(opcache): remap clone prop name/doc_comment/attributes after parent's persist
Signed-off-by: azjezz <azjezz@protonmail.com>
1 parent 4286445 commit 50bf2f7

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

ext/opcache/zend_persist.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,27 @@ static zend_property_info *zend_persist_substituted_property_info(zend_property_
10471047
prop->ce = ce;
10481048
}
10491049

1050+
if (prop->name) {
1051+
zend_string *xlat_name = zend_shared_alloc_get_xlat_entry(prop->name);
1052+
if (xlat_name) {
1053+
prop->name = xlat_name;
1054+
}
1055+
}
1056+
1057+
if (prop->doc_comment) {
1058+
zend_string *xlat_doc = zend_shared_alloc_get_xlat_entry(prop->doc_comment);
1059+
if (xlat_doc) {
1060+
prop->doc_comment = xlat_doc;
1061+
}
1062+
}
1063+
1064+
if (prop->attributes) {
1065+
HashTable *xlat_attrs = zend_shared_alloc_get_xlat_entry(prop->attributes);
1066+
if (xlat_attrs) {
1067+
prop->attributes = xlat_attrs;
1068+
}
1069+
}
1070+
10501071
if (prop->prototype) {
10511072
const zend_property_info *xlat_proto = zend_shared_alloc_get_xlat_entry(prop->prototype);
10521073
if (xlat_proto) {

0 commit comments

Comments
 (0)