com php-src: During size calculation, pointer should be kept unchanged: ext/opcache/zend_persist_calc.c
| From: | Dmitry Stogov | Date: | Mon, 08 Oct 2018 20:52:24 +0000 |
| Subject: | com php-src: During size calculation, pointer should be kept unchanged: ext/opcache/zend_persist_calc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-103401@lists.php.net to get a copy of this message | ||
Commit: ca7ccd01e44cb24638b396f9c79d463f57a0194f
Author: Dmitry Stogov <dmitry@zend.com> Mon, 8 Oct 2018 23:52:24 +0300
Parents: 8a5ababea2b56746c496318216aefd1a9d1f0a98
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ca7ccd01e44cb24638b396f9c79d463f57a0194f
Log:
During size calculation, pointer should be kept unchanged
Changed paths:
M ext/opcache/zend_persist_calc.c
Diff:
diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c
index 66ca701..fcd5db5 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));