mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
Fix dtor in do_free as well
We should expose zval_ptr_dtor_nogc outside zend_execute
This commit is contained in:
parent
1bab755a35
commit
2a26cbb70e
@ -613,7 +613,13 @@ void zend_do_free(znode *op1 TSRMLS_DC) /* {{{ */
|
||||
}
|
||||
}
|
||||
} else if (op1->op_type == IS_CONST) {
|
||||
zval_ptr_dtor(&op1->u.constant);
|
||||
/* Destroy value without using GC: When opcache moves arrays into SHM it will
|
||||
* free the zend_array structure, so references to it from outside the op array
|
||||
* become invalid. GC would cause such a reference in the root buffer. */
|
||||
zval *zv = &op1->u.constant;
|
||||
if (Z_REFCOUNTED_P(zv) && !Z_DELREF_P(zv)) {
|
||||
_zval_dtor_func_for_ptr(Z_COUNTED_P(zv) ZEND_FILE_LINE_CC);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user