From: Dmitry Stogov Date: Mon, 8 Oct 2018 20:52:24 +0000 (+0300) Subject: During size calculation, pointer should be kept unchanged X-Git-Tag: php-7.4.0alpha1~1737 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca7ccd01e44cb24638b396f9c79d463f57a0194f;p=php During size calculation, pointer should be kept unchanged --- diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index 66ca701e1e..fcd5db58a7 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -267,9 +267,7 @@ static void zend_persist_class_method_calc(zval *zv) ZEND_ASSERT(op_array->type == ZEND_USER_FUNCTION); old_op_array = zend_shared_alloc_get_xlat_entry(op_array); - if (old_op_array) { - Z_PTR_P(zv) = old_op_array; - } else { + if (!old_op_array) { ADD_ARENA_SIZE(sizeof(zend_op_array)); zend_persist_op_array_calc_ex(Z_PTR_P(zv)); zend_shared_alloc_register_xlat_entry(op_array, Z_PTR_P(zv));