From: Dmitry Stogov Date: Mon, 5 Mar 2018 21:30:25 +0000 (+0300) Subject: AST is not COPYABLE anymore and its reference-counter doesn't have to be initialized... X-Git-Tag: php-7.3.0alpha1~253 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9d30a7f38cf27452387d22d58d7736ae6db229f;p=php AST is not COPYABLE anymore and its reference-counter doesn't have to be initialized by 2. --- diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 132ecab1d0..74015112e5 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -330,7 +330,7 @@ static void zend_persist_zval(zval *z) Z_ARR_P(z) = zend_accel_memdup(Z_AST_P(z), sizeof(zend_ast_ref)); zend_persist_ast(GC_AST(old_ref)); Z_TYPE_FLAGS_P(z) = 0; - GC_SET_REFCOUNT(Z_COUNTED_P(z), 2); + GC_SET_REFCOUNT(Z_COUNTED_P(z), 1); efree(old_ref); } break;