mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
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:
commit
076811af68
4 changed files with 63 additions and 21 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue