cvs: ZendEngine2(PHP_5_1) / zend_vm_def.h zend_vm_execute.h /tests bug35470.phpt php-src NEWS
| From: | Dmitry Stogov | Date: | Wed, 30 Nov 2005 10:09:40 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_1) / zend_vm_def.h zend_vm_execute.h /tests bug35470.phpt php-src NEWS | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4401@lists.php.net to get a copy of this message | ||
dmitry Wed Nov 30 05:09:40 2005 EDT
Added files: (Branch: PHP_5_1)
/ZendEngine2/tests bug35470.phpt
Modified files:
/php-src NEWS
/ZendEngine2 zend_vm_def.h zend_vm_execute.h
Log:
Fixed bug #35470 (Assigning global using variable name from array doesn't function)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.253&r2=1.2027.2.254&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.253 php-src/NEWS:1.2027.2.254
--- php-src/NEWS:1.2027.2.253 Tue Nov 29 18:19:55 2005
+++ php-src/NEWS Wed Nov 30 05:09:24 2005
@@ -13,6 +13,8 @@
. Fixed isset/empty/(bool) behavior
. Fixed iterator edge cases
. Added methods getNamespaces(), getDocNamespaces()
+- Fixed bug #35470 (Assigning global using variable name from array doesn't
+ function). (Dmitry)
- Fixed bug #35456 (+ 1 [time unit] format did not work). (Ilia)
- Fixed bug #35431 (PDO crashes when using LAZY fetch with fetchAll). (Wez)
- Fixed bug #35430 (PDO crashes on incorrect FETCH_FUNC use). (Tony)
http://cvs.php.net/diff.php/ZendEngine2/zend_vm_def.h?r1=1.59.2.20&r2=1.59.2.21&ty=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.20 ZendEngine2/zend_vm_def.h:1.59.2.21
--- ZendEngine2/zend_vm_def.h:1.59.2.20 Mon Nov 28 09:32:32 2005
+++ ZendEngine2/zend_vm_def.h Wed Nov 30 05:09:34 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.59.2.20 2005/11/28 14:32:32 dmitry Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.21 2005/11/30 10:09:34 dmitry Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -964,6 +964,11 @@
case ZEND_FETCH_STATIC:
zval_update_constant(retval, (void*) 1 TSRMLS_CC);
break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (OP1_TYPE == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ }
+ break;
}
}
http://cvs.php.net/diff.php/ZendEngine2/zend_vm_execute.h?r1=1.62.2.20&r2=1.62.2.21&ty=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.20 ZendEngine2/zend_vm_execute.h:1.62.2.21
--- ZendEngine2/zend_vm_execute.h:1.62.2.20 Mon Nov 28 09:32:32 2005
+++ ZendEngine2/zend_vm_execute.h Wed Nov 30 05:09:34 2005
@@ -1364,7 +1364,7 @@
static int zend_fetch_var_address_helper_SPEC_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
-
+ zend_free_op free_op1;
zval *varname = &opline->op1.u.constant;
zval **retval;
zval tmp_varname;
@@ -1416,6 +1416,11 @@
case ZEND_FETCH_STATIC:
zval_update_constant(retval, (void*) 1 TSRMLS_CC);
break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_CONST == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ }
+ break;
}
}
@@ -3825,6 +3830,11 @@
case ZEND_FETCH_STATIC:
zval_update_constant(retval, (void*) 1 TSRMLS_CC);
break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ }
+ break;
}
}
@@ -6727,6 +6737,11 @@
case ZEND_FETCH_STATIC:
zval_update_constant(retval, (void*) 1 TSRMLS_CC);
break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_VAR == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ }
+ break;
}
}
@@ -18778,7 +18793,7 @@
static int zend_fetch_var_address_helper_SPEC_CV(int type, ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
-
+ zend_free_op free_op1;
zval *varname = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
zval **retval;
zval tmp_varname;
@@ -18830,6 +18845,11 @@
case ZEND_FETCH_STATIC:
zval_update_constant(retval, (void*) 1 TSRMLS_CC);
break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_CV == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ }
+ break;
}
}
http://cvs.php.net/co.php/ZendEngine2/tests/bug35470.phpt?r=1.1&p=1
Index: ZendEngine2/tests/bug35470.phpt
+++ ZendEngine2/tests/bug35470.phpt