diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-05-22 09:35:49 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-05-22 09:35:49 +0200 |
| commit | c06f07f55b83803c84eff6c09f2d946e0d6623f5 (patch) | |
| tree | a9a05913181d593d0c4c3f077feed1e06ceab4cf | |
| parent | f17931a8bb4665d7b0e77ba1b22d7acc25564f85 (diff) | |
| parent | ff4b0ce0e8d582e4b8f6c44270a77f511d28bacd (diff) | |
| download | php-git-c06f07f55b83803c84eff6c09f2d946e0d6623f5.tar.gz | |
Merge branch 'PHP-7.4'
| -rw-r--r-- | ext/opcache/Optimizer/zend_dfg.c | 4 | ||||
| -rw-r--r-- | ext/opcache/tests/bug78034.phpt | 21 |
2 files changed, 23 insertions, 2 deletions
diff --git a/ext/opcache/Optimizer/zend_dfg.c b/ext/opcache/Optimizer/zend_dfg.c index 00a7dba10c..a1104614f2 100644 --- a/ext/opcache/Optimizer/zend_dfg.c +++ b/ext/opcache/Optimizer/zend_dfg.c @@ -52,8 +52,8 @@ int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg if (next < end && next->opcode == ZEND_OP_DATA) { if (next->op1_type & (IS_CV|IS_VAR|IS_TMP_VAR)) { var_num = EX_VAR_TO_NUM(next->op1.var); - if (opline->opcode == ZEND_ASSIGN_OBJ_REF - || opline->opcode == ZEND_ASSIGN_STATIC_PROP_REF) { + if (next->op1_type == IS_CV && (opline->opcode == ZEND_ASSIGN_OBJ_REF + || opline->opcode == ZEND_ASSIGN_STATIC_PROP_REF)) { DFG_SET(use, set_size, j, var_num); DFG_SET(def, set_size, j, var_num); } else { diff --git a/ext/opcache/tests/bug78034.phpt b/ext/opcache/tests/bug78034.phpt new file mode 100644 index 0000000000..ca9cd4ec07 --- /dev/null +++ b/ext/opcache/tests/bug78034.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #78034: "pecl" tool fails with abort assertion in zend_ssa.c +--FILE-- +<?php + +function &ref() {} + +class Test { + function method($bool) { + if (!$bool) { + $this->foo = &ref(); + } + + $this->foo = &ref(); + } +} + +?> +===DONE=== +--EXPECT-- +===DONE=== |
