cvs: ZendEngine2(PHP_5_2) / zend_vm_def.h zend_vm_execute.h /tests bug40509.phpt bug40705.phpt php-src NEWS
| From: | Dmitry Stogov | Date: | Tue, 24 Jul 2007 19:24:41 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_2) / zend_vm_def.h zend_vm_execute.h /tests bug40509.phpt bug40705.phpt php-src NEWS | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5924@lists.php.net to get a copy of this message | ||
dmitry Tue Jul 24 19:24:41 2007 UTC
Added files: (Branch: PHP_5_2)
/ZendEngine2/tests bug40509.phpt bug40705.phpt
Modified files:
/php-src NEWS
/ZendEngine2 zend_vm_def.h zend_vm_execute.h
Log:
Fixed bug #40705 (Iterating within function moves original array pointer)
Fixed bug #40509 (key() function changed behaviour if global array is used within function)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.854&r2=1.2027.2.547.2.855&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.854 php-src/NEWS:1.2027.2.547.2.855
--- php-src/NEWS:1.2027.2.547.2.854 Tue Jul 24 18:28:38 2007
+++ php-src/NEWS Tue Jul 24 19:24:39 2007
@@ -169,6 +169,10 @@
- Fixed bug #41127 (Memory leak in ldap_{first|next}_attribute functions).
(Jani)
- Fixed bug #40757 (get_object_vars get nothing in child class). (Dmitry)
+- Fixed bug #40705 (Iterating within function moves original array pointer).
+ (Dmitry)
+- Fixed bug #40509 (key() function changed behaviour if global array is used
+ within function). (Dmitry)
- Fixed bug #40419 (Trailing slash in CGI request does not work). (Dmitry)
- Fixed bug #39330 (apache2handler does not call shutdown actions before
apache child die). (isk at ecommerce dot com, Gopal, Tony)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.46&r2=1.59.2.29.2.47&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.46 ZendEngine2/zend_vm_def.h:1.59.2.29.2.47
--- ZendEngine2/zend_vm_def.h:1.59.2.29.2.46 Wed Jun 13 14:50:12 2007
+++ ZendEngine2/zend_vm_def.h Tue Jul 24 19:24:39 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.59.2.29.2.46 2007/06/13 14:50:12 dmitry Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.29.2.47 2007/07/24 19:24:39 dmitry Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -3127,11 +3127,9 @@
array_ptr->refcount++;
}
} else {
- if (OP1_TYPE == IS_VAR &&
- free_op1.var == NULL &&
+ if ((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
- /* non-separated return value from function */
zval *tmp;
ALLOC_ZVAL(tmp);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.47&r2=1.62.2.30.2.48&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.47 ZendEngine2/zend_vm_execute.h:1.62.2.30.2.48
--- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.47 Sat Jul 21 00:35:14 2007
+++ ZendEngine2/zend_vm_execute.h Tue Jul 24 19:24:39 2007
@@ -2122,7 +2122,7 @@
static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
- zend_free_op free_op1;
+
zval *array_ptr, **array_ptr_ptr;
HashTable *fe_ht;
zend_object_iterator *iter = NULL;
@@ -2169,11 +2169,9 @@
array_ptr->refcount++;
}
} else {
- if (IS_CONST == IS_VAR &&
- free_op1.var == NULL &&
+ if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
- /* non-separated return value from function */
zval *tmp;
ALLOC_ZVAL(tmp);
@@ -4737,11 +4735,9 @@
array_ptr->refcount++;
}
} else {
- if (IS_TMP_VAR == IS_VAR &&
- free_op1.var == NULL &&
+ if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
- /* non-separated return value from function */
zval *tmp;
ALLOC_ZVAL(tmp);
@@ -7877,11 +7873,9 @@
array_ptr->refcount++;
}
} else {
- if (IS_VAR == IS_VAR &&
- free_op1.var == NULL &&
+ if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
- /* non-separated return value from function */
zval *tmp;
ALLOC_ZVAL(tmp);
@@ -19895,7 +19889,7 @@
static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
- zend_free_op free_op1;
+
zval *array_ptr, **array_ptr_ptr;
HashTable *fe_ht;
zend_object_iterator *iter = NULL;
@@ -19942,11 +19936,9 @@
array_ptr->refcount++;
}
} else {
- if (IS_CV == IS_VAR &&
- free_op1.var == NULL &&
+ if ((IS_CV == IS_CV || IS_CV == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
- /* non-separated return value from function */
zval *tmp;
ALLOC_ZVAL(tmp);
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug40509.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug40509.phpt
+++ ZendEngine2/tests/bug40509.phpt
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug40705.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug40705.phpt
+++ ZendEngine2/tests/bug40705.phpt