From eb6d496a93b66b51476e6d26921036440bab82b6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 16 Nov 2020 14:51:55 +0300 Subject: [PATCH] Fixed reference-counting --- ext/opcache/jit/zend_jit_x86.dasc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 8b61d5b092..15b2420b43 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -12015,6 +12015,13 @@ static int zend_jit_fetch_dim(dasm_State **Dst, } } +#ifdef ZEND_JIT_USE_RC_INFERENCE + if ((opline->op2_type & (IS_TMP_VAR|IS_VAR)) && (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_ARRAY|MAY_BE_OBJECT))) { + /* ASSIGN_DIM may increase refcount of the key */ + op2_info |= MAY_BE_RCN; + } +#endif + |8: | FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline -- 2.50.1