com php-src: Fixed incorrect reference counting (we shouldn't skip ADDREF for IS_CV result): ext/opcache/jit/zend_jit_x8 6.dasc
| From: | Dmitry Stogov | Date: | Mon, 27 Jul 2020 10:18:34 +0000 |
| Subject: | com php-src: Fixed incorrect reference counting (we shouldn't skip ADDREF for IS_CV result): ext/opcache/jit/zend_jit_x8 6.dasc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112371@lists.php.net to get a copy of this message | ||
Commit: c56c19cec37334b3a5466cf561053ad1db27cb81
Author: Dmitry Stogov <dmitry@zend.com> Mon, 27 Jul 2020 13:18:34 +0300
Parents: 041cbec0230bbe4d509c63ac856d1bd270977944
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c56c19cec37334b3a5466cf561053ad1db27cb81
Log:
Fixed incorrect reference counting (we shouldn't skip ADDREF for IS_CV result)
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 8c446a133e..6ae7f32508 100644
--- a/ext/opcache/jit/zend_jit_x86.dasc
+++ b/ext/opcache/jit/zend_jit_x86.dasc
@@ -10434,7 +10434,8 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst, const zend_op *opline,
cons
&& (op2_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))) {
flags |= ZEND_JIT_EXIT_FREE_OP2;
}
- if ((res_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))
+ 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
&& zend_jit_may_avoid_refcounting(opline+1)) {
res_info |= AVOID_REFCOUNTING;
@@ -11419,7 +11420,8 @@ static int zend_jit_fetch_obj(dasm_State **Dst, const zend_op *opline, const
zen
| LOAD_ZVAL_ADDR r0, prop_addr
- if ((res_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))
+ 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
&& zend_jit_may_avoid_refcounting(opline+1)) {
res_info |= AVOID_REFCOUNTING;