com php-src: Fixed memory leaks caused by incorrect AVOID_REFCOUNTING flag: ext/opcache/jit/zend_jit_x 86.dasc
| From: | Dmitry Stogov | Date: | Thu, 30 Jul 2020 13:59:41 +0000 |
| Subject: | com php-src: Fixed memory leaks caused by incorrect AVOID_REFCOUNTING flag: ext/opcache/jit/zend_jit_x 86.dasc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112459@lists.php.net to get a copy of this message | ||
Commit: 8b4397648371816bba3ba35c70aa2f2734d5a5e2
Author: Dmitry Stogov <dmitry@zend.com> Thu, 30 Jul 2020 16:59:41 +0300
Parents: 5f25618f8362b3f6cf502d8dd7b3cef7e0313f9c
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8b4397648371816bba3ba35c70aa2f2734d5a5e2
Log:
Fixed memory leaks caused by incorrect AVOID_REFCOUNTING flag
Changed paths:
M ext/opcache/jit/zend_jit_x86.dasc
Diff:
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc
index 107e2c5de8..840d54a607 100644
--- a/ext/opcache/jit/zend_jit_x86.dasc
+++ b/ext/opcache/jit/zend_jit_x86.dasc
@@ -10435,6 +10435,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst, const zend_op *opline,
cons
if ((opline->result_type & (IS_VAR|IS_TMP_VAR))
&& (res_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))
&& (ssa_op+1)->op1_use == ssa_op->result_def
+ && !(op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF) -
(MAY_BE_STRING|MAY_BE_LONG)))
&& zend_jit_may_avoid_refcounting(opline+1)) {
res_info |= AVOID_REFCOUNTING;
ssa->var_info[ssa_op->result_def].type |= AVOID_REFCOUNTING;