From fcc08ce19f39f7ab1381ecc8a010037d41819329 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 30 Oct 2017 23:13:10 +0300 Subject: 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. --- Zend/zend_execute_API.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend_execute_API.c') 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; -- cgit v1.2.1