From: Dmitry Stogov Date: Thu, 17 Aug 2017 17:03:12 +0000 (+0300) Subject: More accurate reference counting inference X-Git-Tag: php-7.2.0RC1~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3866c1699e5d4acdbd2f580b0d3d93dc4f2efa1a;p=php More accurate reference counting inference --- diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 6457c93177..9d5d6cfea5 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2978,13 +2978,10 @@ static int zend_update_type_info(const zend_op_array *op_array, } tmp |= MAY_BE_ARRAY | MAY_BE_RC1; } - if (t1 & MAY_BE_STRING) { - tmp |= MAY_BE_RC1; - } - if (t1 & MAY_BE_ARRAY) { + if (t1 & (MAY_BE_STRING|MAY_BE_ARRAY)) { tmp |= MAY_BE_RC1; if (opline->opcode == ZEND_FETCH_DIM_FUNC_ARG) { - tmp |= MAY_BE_RCN; + tmp |= t1 & MAY_BE_RCN; } } if (t1 & (MAY_BE_OBJECT|MAY_BE_RESOURCE)) {