]> granicus.if.org Git - php/commitdiff
Fixed reference-counting
authorDmitry Stogov <dmitry@zend.com>
Mon, 16 Nov 2020 11:51:55 +0000 (14:51 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 16 Nov 2020 11:51:55 +0000 (14:51 +0300)
ext/opcache/jit/zend_jit_x86.dasc

index 8b61d5b092e1103f435fbf9057e4ba6628d05c00..15b2420b439e38d53ddc8e2f929d3c4ae239c562 100644 (file)
@@ -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