cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_vm_def.h zend_vm_execute.h
| From: | Dmitry Stogov | Date: | Mon, 12 May 2008 09:09:28 +0000 |
| Subject: | cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_vm_def.h zend_vm_execute.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-6718@lists.php.net to get a copy of this message | ||
dmitry Mon May 12 09:09:28 2008 UTC
Modified files:
/ZendEngine2 zend_compile.c zend_compile.h zend_vm_def.h
zend_vm_execute.h
Log:
Fixed bug #44952 (isset() does not checks correctly variable variable)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.823&r2=1.824&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.823 ZendEngine2/zend_compile.c:1.824 --- ZendEngine2/zend_compile.c:1.823 Wed May 7 12:04:57 2008 +++ ZendEngine2/zend_compile.c Mon May 12 09:09:27 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.823 2008/05/07 12:04:57 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.824 2008/05/12 09:09:27 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -4442,6 +4442,7 @@ SET_UNUSED(opline->op2); opline->op2.u.EA.type = ZEND_FETCH_LOCAL; SET_UNUSED(opline->result); + opline->extended_value = ZEND_QUICK_SET; } else { last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1]; @@ -4476,6 +4477,7 @@ SET_UNUSED(last_op->op2); last_op->op2.u.EA.type = ZEND_FETCH_LOCAL; last_op->result.u.var = get_temporary_variable(CG(active_op_array)); + last_op->extended_value = ZEND_QUICK_SET; } else { last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1]; @@ -4490,9 +4492,10 @@ last_op->opcode = ZEND_ISSET_ISEMPTY_PROP_OBJ; break; } + last_op->extended_value = 0; } last_op->result.op_type = IS_TMP_VAR; - last_op->extended_value = type; + last_op->extended_value |= type; *result = last_op->result; } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.h?r1=1.380&r2=1.381&diff_format=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.380 ZendEngine2/zend_compile.h:1.381 --- ZendEngine2/zend_compile.h:1.380 Wed May 7 12:04:57 2008 +++ ZendEngine2/zend_compile.h Mon May 12 09:09:28 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.380 2008/05/07 12:04:57 dmitry Exp $ */ +/* $Id: zend_compile.h,v 1.381 2008/05/12 09:09:28 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -691,6 +691,8 @@ #define ZEND_ISSET (1<<0) #define ZEND_ISEMPTY (1<<1) +#define ZEND_ISSET_ISEMPTY_MASK (ZEND_ISSET | ZEND_ISEMPTY) +#define ZEND_QUICK_SET (1<<2) #define ZEND_CT (1<<0) #define ZEND_RT (1<<1) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.230&r2=1.231&diff_format=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.230 ZendEngine2/zend_vm_def.h:1.231 --- ZendEngine2/zend_vm_def.h:1.230 Wed May 7 12:04:58 2008 +++ ZendEngine2/zend_vm_def.h Mon May 12 09:09:28 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.230 2008/05/07 12:04:58 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.231 2008/05/12 09:09:28 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -3258,7 +3258,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (OP1_TYPE == IS_CV) { + if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -3295,7 +3295,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (OP1_TYPE == IS_VAR) { + } else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { Z_ADDREF_P(varname); } @@ -3332,7 +3332,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (OP1_TYPE == IS_VAR) { + } else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { zval_ptr_dtor(&varname); } FREE_OP1(); @@ -3802,7 +3802,7 @@ zval **value; zend_bool isset = 1; - if (OP1_TYPE == IS_CV) { + if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -3846,7 +3846,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.234&r2=1.235&diff_format=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.234 ZendEngine2/zend_vm_execute.h:1.235 --- ZendEngine2/zend_vm_execute.h:1.234 Wed May 7 12:04:58 2008 +++ ZendEngine2/zend_vm_execute.h Mon May 12 09:09:28 2008 @@ -1819,7 +1819,7 @@ HashTable *target_symbol_table; - if (IS_CONST == IS_CV) { + if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -1856,7 +1856,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (IS_CONST == IS_VAR) { + } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { Z_ADDREF_P(varname); } @@ -1893,7 +1893,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_CONST == IS_VAR) { + } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { zval_ptr_dtor(&varname); } @@ -2058,7 +2058,7 @@ zval **value; zend_bool isset = 1; - if (IS_CONST == IS_CV) { + if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -2102,7 +2102,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -5172,7 +5172,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (IS_TMP_VAR == IS_CV) { + if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -5209,7 +5209,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (IS_TMP_VAR == IS_VAR) { + } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { Z_ADDREF_P(varname); } @@ -5246,7 +5246,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_TMP_VAR == IS_VAR) { + } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { zval_ptr_dtor(&varname); } zval_dtor(free_op1.var); @@ -5411,7 +5411,7 @@ zval **value; zend_bool isset = 1; - if (IS_TMP_VAR == IS_CV) { + if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -5455,7 +5455,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -8566,7 +8566,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (IS_VAR == IS_CV) { + if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -8603,7 +8603,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (IS_VAR == IS_VAR) { + } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { Z_ADDREF_P(varname); } @@ -8640,7 +8640,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_VAR == IS_VAR) { + } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { zval_ptr_dtor(&varname); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -8961,7 +8961,7 @@ zval **value; zend_bool isset = 1; - if (IS_VAR == IS_CV) { + if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -9005,7 +9005,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -22875,7 +22875,7 @@ HashTable *target_symbol_table; - if (IS_CV == IS_CV) { + if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -22912,7 +22912,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (IS_CV == IS_VAR) { + } else if (IS_CV == IS_VAR || IS_CV == IS_CV) { Z_ADDREF_P(varname); } @@ -22949,7 +22949,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_CV == IS_VAR) { + } else if (IS_CV == IS_VAR || IS_CV == IS_CV) { zval_ptr_dtor(&varname); } @@ -23114,7 +23114,7 @@ zval **value; zend_bool isset = 1; - if (IS_CV == IS_CV) { + if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -23158,7 +23158,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.823&r2=1.824&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.823 ZendEngine2/zend_compile.c:1.824 --- ZendEngine2/zend_compile.c:1.823 Wed May 7 12:04:57 2008 +++ ZendEngine2/zend_compile.c Mon May 12 09:09:27 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.823 2008/05/07 12:04:57 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.824 2008/05/12 09:09:27 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -4442,6 +4442,7 @@ SET_UNUSED(opline->op2); opline->op2.u.EA.type = ZEND_FETCH_LOCAL; SET_UNUSED(opline->result); + opline->extended_value = ZEND_QUICK_SET; } else { last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1]; @@ -4476,6 +4477,7 @@ SET_UNUSED(last_op->op2); last_op->op2.u.EA.type = ZEND_FETCH_LOCAL; last_op->result.u.var = get_temporary_variable(CG(active_op_array)); + last_op->extended_value = ZEND_QUICK_SET; } else { last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1]; @@ -4490,9 +4492,10 @@ last_op->opcode = ZEND_ISSET_ISEMPTY_PROP_OBJ; break; } + last_op->extended_value = 0; } last_op->result.op_type = IS_TMP_VAR; - last_op->extended_value = type; + last_op->extended_value |= type; *result = last_op->result; } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.h?r1=1.380&r2=1.381&diff_format=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.380 ZendEngine2/zend_compile.h:1.381 --- ZendEngine2/zend_compile.h:1.380 Wed May 7 12:04:57 2008 +++ ZendEngine2/zend_compile.h Mon May 12 09:09:28 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.380 2008/05/07 12:04:57 dmitry Exp $ */ +/* $Id: zend_compile.h,v 1.381 2008/05/12 09:09:28 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -691,6 +691,8 @@ #define ZEND_ISSET (1<<0) #define ZEND_ISEMPTY (1<<1) +#define ZEND_ISSET_ISEMPTY_MASK (ZEND_ISSET | ZEND_ISEMPTY) +#define ZEND_QUICK_SET (1<<2) #define ZEND_CT (1<<0) #define ZEND_RT (1<<1) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.230&r2=1.231&diff_format=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.230 ZendEngine2/zend_vm_def.h:1.231 --- ZendEngine2/zend_vm_def.h:1.230 Wed May 7 12:04:58 2008 +++ ZendEngine2/zend_vm_def.h Mon May 12 09:09:28 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.230 2008/05/07 12:04:58 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.231 2008/05/12 09:09:28 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -3258,7 +3258,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (OP1_TYPE == IS_CV) { + if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -3295,7 +3295,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (OP1_TYPE == IS_VAR) { + } else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { Z_ADDREF_P(varname); } @@ -3332,7 +3332,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (OP1_TYPE == IS_VAR) { + } else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { zval_ptr_dtor(&varname); } FREE_OP1(); @@ -3802,7 +3802,7 @@ zval **value; zend_bool isset = 1; - if (OP1_TYPE == IS_CV) { + if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -3846,7 +3846,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.234&r2=1.235&diff_format=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.234 ZendEngine2/zend_vm_execute.h:1.235 --- ZendEngine2/zend_vm_execute.h:1.234 Wed May 7 12:04:58 2008 +++ ZendEngine2/zend_vm_execute.h Mon May 12 09:09:28 2008 @@ -1819,7 +1819,7 @@ HashTable *target_symbol_table; - if (IS_CONST == IS_CV) { + if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -1856,7 +1856,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (IS_CONST == IS_VAR) { + } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { Z_ADDREF_P(varname); } @@ -1893,7 +1893,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_CONST == IS_VAR) { + } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { zval_ptr_dtor(&varname); } @@ -2058,7 +2058,7 @@ zval **value; zend_bool isset = 1; - if (IS_CONST == IS_CV) { + if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -2102,7 +2102,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -5172,7 +5172,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (IS_TMP_VAR == IS_CV) { + if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -5209,7 +5209,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (IS_TMP_VAR == IS_VAR) { + } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { Z_ADDREF_P(varname); } @@ -5246,7 +5246,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_TMP_VAR == IS_VAR) { + } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { zval_ptr_dtor(&varname); } zval_dtor(free_op1.var); @@ -5411,7 +5411,7 @@ zval **value; zend_bool isset = 1; - if (IS_TMP_VAR == IS_CV) { + if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -5455,7 +5455,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -8566,7 +8566,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (IS_VAR == IS_CV) { + if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -8603,7 +8603,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (IS_VAR == IS_VAR) { + } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { Z_ADDREF_P(varname); } @@ -8640,7 +8640,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_VAR == IS_VAR) { + } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { zval_ptr_dtor(&varname); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -8961,7 +8961,7 @@ zval **value; zend_bool isset = 1; - if (IS_VAR == IS_CV) { + if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -9005,7 +9005,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -22875,7 +22875,7 @@ HashTable *target_symbol_table; - if (IS_CV == IS_CV) { + if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -22912,7 +22912,7 @@ zval_copy_ctor(&tmp); convert_to_text(&tmp); varname = &tmp; - } else if (IS_CV == IS_VAR) { + } else if (IS_CV == IS_VAR || IS_CV == IS_CV) { Z_ADDREF_P(varname); } @@ -22949,7 +22949,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_CV == IS_VAR) { + } else if (IS_CV == IS_VAR || IS_CV == IS_CV) { zval_ptr_dtor(&varname); } @@ -23114,7 +23114,7 @@ zval **value; zend_bool isset = 1; - if (IS_CV == IS_CV) { + if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -23158,7 +23158,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;