summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-10-30 23:13:10 +0300
committerDmitry Stogov <dmitry@zend.com>2017-10-30 23:13:10 +0300
commitfcc08ce19f39f7ab1381ecc8a010037d41819329 (patch)
treec390b9b848758ad8e8b79b8f11e9a798a7de039d /Zend/zend_execute_API.c
parentdc4427d0caf2d066cd01f91fd0e899217fbceb30 (diff)
downloadphp-git-fcc08ce19f39f7ab1381ecc8a010037d41819329.tar.gz
Prevent reference-counting on persistent zvals (internal constants, default properties and constants of internal classes).
New macro ZVAL_COPY_OR_DUP() is used perform duplication, if necessary. This should eliminate related race-coditions in ZTS build and prevent reference-counting bugs after unclean shutdown.
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index d159305c96..8ffeaf0b5c 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -590,7 +590,7 @@ ZEND_API int zval_update_constant_ex(zval *p, zend_class_entry *scope) /* {{{ */
return zend_use_undefined_constant(name, ast->attr, p);
}
zval_ptr_dtor_nogc(p);
- ZVAL_DUP(p, zv);
+ ZVAL_COPY_OR_DUP(p, zv);
} else {
zval tmp;