mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6: Prevent usage in GC after free.
This commit is contained in:
commit
e46be0cd19
1 changed files with 2 additions and 1 deletions
|
@ -657,7 +657,8 @@ static void do_inherit_property(zend_property_info *parent_info, zend_string *ke
|
|||
int parent_num = OBJ_PROP_TO_NUM(parent_info->offset);
|
||||
int child_num = OBJ_PROP_TO_NUM(child_info->offset);
|
||||
|
||||
zval_ptr_dtor(&(ce->default_properties_table[parent_num]));
|
||||
/* Don't keep default properties in GC (thry may be freed by opcache) */
|
||||
zval_ptr_dtor_nogc(&(ce->default_properties_table[parent_num]));
|
||||
ce->default_properties_table[parent_num] = ce->default_properties_table[child_num];
|
||||
ZVAL_UNDEF(&ce->default_properties_table[child_num]);
|
||||
child_info->offset = parent_info->offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue