Merge branch 'PHP-8.4'

* PHP-8.4:
  Fix segfault when evaluating const expr default value of child prop with added hooks
This commit is contained in:
Ilija Tovilo 2025-03-23 16:35:21 +01:00
commit 076811af68
No known key found for this signature in database
GPG key ID: 5050C66BFCD1015A
4 changed files with 63 additions and 21 deletions

View file

@ -1613,8 +1613,12 @@ ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type) /
/* Use the default properties table to also update initializers of private properties
* that have been shadowed in a child class. */
for (uint32_t i = 0; i < class_type->default_properties_count; i++) {
val = &default_properties_table[i];
prop_info = class_type->properties_info_table[i];
if (!prop_info) {
continue;
}
val = &default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)];
if (Z_TYPE_P(val) == IS_CONSTANT_AST
&& UNEXPECTED(update_property(val, prop_info) != SUCCESS)) {
return FAILURE;