cvs: ZendEngine2(PHP_5_2) / zend_vm_def.h zend_vm_execute.h /tests bug38211.phpt php-src NEWS

From: Date: Wed, 26 Jul 2006 09:24:27 +0000
Subject: cvs: ZendEngine2(PHP_5_2) / zend_vm_def.h zend_vm_execute.h /tests bug38211.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5132@lists.php.net to get a copy of this message
dmitry Wed Jul 26 09:24:27 2006 UTC Added files: (Branch: PHP_5_2) /ZendEngine2/tests bug38211.phpt Modified files: /php-src NEWS /ZendEngine2 zend_vm_def.h zend_vm_execute.h Log: Fixed bug #38211 (variable name and cookie name match breaks script execution)

http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.147&r2=1.2027.2.547.2.148&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.147 php-src/NEWS:1.2027.2.547.2.148 --- php-src/NEWS:1.2027.2.547.2.147 Wed Jul 26 08:03:48 2006 +++ php-src/NEWS Wed Jul 26 09:24:25 2006 @@ -11,6 +11,8 @@ - Fixed bug #38217 (ReflectionClass::newInstanceArgs() tries to allocate too much memory). (Tony) +- Fixed bug #38211 (variable name and cookie name match breaks script + execution). (Dmitry) - Fixed bug #38194 (ReflectionClass::isSubclassOf() returns TRUE for the class itself). (Ilia) - Fixed bug #38132 (ReflectionClass::getStaticProperties() retains \0 in key http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.16&r2=1.59.2.29.2.17&diff_format=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.16 ZendEngine2/zend_vm_def.h:1.59.2.29.2.17 --- ZendEngine2/zend_vm_def.h:1.59.2.29.2.16 Mon Jul 24 17:58:32 2006 +++ ZendEngine2/zend_vm_def.h Wed Jul 26 09:24:25 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.59.2.29.2.16 2006/07/24 17:58:32 helly Exp $ */ +/* $Id: zend_vm_def.h,v 1.59.2.29.2.17 2006/07/26 09:24:25 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -2877,12 +2877,14 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; + } else if (OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) { + varname->refcount++; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC); } else { - target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); + target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_hash_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1) == SUCCESS) { zend_execute_data *ex = EXECUTE_DATA; ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1); @@ -2907,6 +2909,8 @@ if (varname == &tmp) { zval_dtor(&tmp); + } else if (OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) { + zval_ptr_dtor(&varname); } FREE_OP1(); ZEND_VM_NEXT_OPCODE(); @@ -2940,6 +2944,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (OP2_TYPE == IS_CV || OP2_TYPE == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -2960,6 +2967,9 @@ } } } + if (OP2_TYPE == IS_CV || OP2_TYPE == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.16&r2=1.62.2.30.2.17&diff_format=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.16 ZendEngine2/zend_vm_execute.h:1.62.2.30.2.17 --- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.16 Mon Jul 24 17:58:32 2006 +++ ZendEngine2/zend_vm_execute.h Wed Jul 26 09:24:26 2006 @@ -2037,6 +2037,8 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; + } else if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { + varname->refcount++; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { @@ -2067,6 +2069,8 @@ if (varname == &tmp) { zval_dtor(&tmp); + } else if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { + zval_ptr_dtor(&varname); } ZEND_VM_NEXT_OPCODE(); @@ -4547,6 +4551,8 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; + } else if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) { + varname->refcount++; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { @@ -4577,6 +4583,8 @@ if (varname == &tmp) { zval_dtor(&tmp); + } else if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) { + zval_ptr_dtor(&varname); } zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); @@ -7639,6 +7647,8 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; + } else if (IS_VAR == IS_CV || IS_VAR == IS_VAR) { + varname->refcount++; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { @@ -7669,6 +7679,8 @@ if (varname == &tmp) { zval_dtor(&tmp); + } else if (IS_VAR == IS_CV || IS_VAR == IS_VAR) { + zval_ptr_dtor(&varname); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); @@ -9305,6 +9317,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -9325,6 +9340,9 @@ } } } + if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -10774,6 +10792,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -10794,6 +10815,9 @@ } } } + if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -12281,6 +12305,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_VAR == IS_CV || IS_VAR == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -12301,6 +12328,9 @@ } } } + if (IS_VAR == IS_CV || IS_VAR == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -14211,6 +14241,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_CV == IS_CV || IS_CV == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -14231,6 +14264,9 @@ } } } + if (IS_CV == IS_CV || IS_CV == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -15394,6 +15430,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -15414,6 +15453,9 @@ } } } + if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -16458,6 +16500,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -16478,6 +16523,9 @@ } } } + if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -17522,6 +17570,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_VAR == IS_CV || IS_VAR == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -17542,6 +17593,9 @@ } } } + if (IS_VAR == IS_CV || IS_VAR == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -18958,6 +19012,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_CV == IS_CV || IS_CV == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -18978,6 +19035,9 @@ } } } + if (IS_CV == IS_CV || IS_CV == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -20091,6 +20151,8 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; + } else if (IS_CV == IS_CV || IS_CV == IS_VAR) { + varname->refcount++; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { @@ -20121,6 +20183,8 @@ if (varname == &tmp) { zval_dtor(&tmp); + } else if (IS_CV == IS_CV || IS_CV == IS_VAR) { + zval_ptr_dtor(&varname); } ZEND_VM_NEXT_OPCODE(); @@ -21611,6 +21675,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -21631,6 +21698,9 @@ } } } + if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -23072,6 +23142,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -23092,6 +23165,9 @@ } } } + if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -24570,6 +24646,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_VAR == IS_CV || IS_VAR == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -24590,6 +24669,9 @@ } } } + if (IS_VAR == IS_CV || IS_VAR == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); @@ -26490,6 +26572,9 @@ zend_hash_index_del(ht, index); break; case IS_STRING: + if (IS_CV == IS_CV || IS_CV == IS_VAR) { + offset->refcount++; + } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -26510,6 +26595,9 @@ } } } + if (IS_CV == IS_CV || IS_CV == IS_VAR) { + zval_ptr_dtor(&offset); + } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug38211.phpt?view=markup&rev=1.1 Index: ZendEngine2/tests/bug38211.phpt +++ ZendEngine2/tests/bug38211.phpt
« previous php.zend-engine.cvs (#5132) next »