summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2020-11-16 14:51:55 +0300
committerDmitry Stogov <dmitry@zend.com>2020-11-16 14:51:55 +0300
commiteb6d496a93b66b51476e6d26921036440bab82b6 (patch)
tree8472be13c2a71bcc386a9165f168e47a2a886449
parentedf5c1901f81160e8c3ac9827c0b4adc230f1b1a (diff)
downloadphp-git-eb6d496a93b66b51476e6d26921036440bab82b6.tar.gz
Fixed reference-counting
-rw-r--r--ext/opcache/jit/zend_jit_x86.dasc7
1 files changed, 7 insertions, 0 deletions
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