mirror of
https://github.com/php/php-src.git
synced 2025-01-24 20:53:37 +08:00
Fix bug #78034
Don't def non-cv variables in assign_obj_ref data operand.
This commit is contained in:
parent
d6c0c5ef8e
commit
ff4b0ce0e8
@ -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 {
|
||||
|
21
ext/opcache/tests/bug78034.phpt
Normal file
21
ext/opcache/tests/bug78034.phpt
Normal file
@ -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===
|
Loading…
Reference in New Issue
Block a user