cvs: ZendEngine2(PHP_5_2) / zend_execute.c /tests bug33282.phpt
| From: | Ilia Alshanetsky | Date: | Tue, 07 Nov 2006 20:23:30 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_2) / zend_execute.c /tests bug33282.phpt | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5366@lists.php.net to get a copy of this message | ||
iliaa Tue Nov 7 20:23:30 2006 UTC
Added files: (Branch: PHP_5_2)
/ZendEngine2/tests bug33282.phpt
Modified files:
/ZendEngine2 zend_execute.c
Log:
Fixed bug #33282 (Re-assignment by reference does not clear the is_ref flag)
# Original patch by Matt Wilmas
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.12.2.12&r2=1.716.2.12.2.13&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.716.2.12.2.12 ZendEngine2/zend_execute.c:1.716.2.12.2.13
--- ZendEngine2/zend_execute.c:1.716.2.12.2.12 Mon Oct 2 11:09:52 2006
+++ ZendEngine2/zend_execute.c Tue Nov 7 20:23:30 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.716.2.12.2.12 2006/10/02 11:09:52 tony2001 Exp $ */
+/* $Id: zend_execute.c,v 1.716.2.12.2.13 2006/11/07 20:23:30 iliaa Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -411,11 +411,7 @@
*variable_ptr_ptr = value_ptr;
value_ptr->refcount++;
- variable_ptr->refcount--;
- if (variable_ptr->refcount==0) {
- zendi_zval_dtor(*variable_ptr);
- FREE_ZVAL(variable_ptr);
- }
+ zval_ptr_dtor(&variable_ptr);
} else if (!variable_ptr->is_ref) {
if (variable_ptr_ptr == value_ptr_ptr) {
SEPARATE_ZVAL(variable_ptr_ptr);
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug33282.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug33282.phpt
+++ ZendEngine2/tests/bug33282.phpt