cvs: Zend(PHP_4_4) / zend_execute.c php-src NEWS
| From: | Dmitry Stogov | Date: | Thu, 01 Sep 2005 13:26:46 +0000 |
| Subject: | cvs: Zend(PHP_4_4) / zend_execute.c php-src NEWS | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4094@lists.php.net to get a copy of this message | ||
dmitry Thu Sep 1 09:26:46 2005 EDT
Modified files: (Branch: PHP_4_4)
/php-src NEWS
/Zend zend_execute.c
Log:
Fixed bug #34137 (assigning array element by reference causes binary mess)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.32&r2=1.1247.2.920.2.33&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.32 php-src/NEWS:1.1247.2.920.2.33
--- php-src/NEWS:1.1247.2.920.2.32 Thu Sep 1 08:01:25 2005
+++ php-src/NEWS Thu Sep 1 09:26:44 2005
@@ -9,6 +9,8 @@
- Fixed bug #34156 (memory usage remains elevated after memory limit is
reached). (Ilia)
- Fixed bug #34148 (+,- and . not supported as parts of scheme). (Ilia)
+- Fixed bug #34137 (assigning array element by reference causes binary mess).
+ (Dmitry)
- Fixed bug #34068 (Numeric string as array key not cast to integer in
wddx_deserialize()). (Ilia)
- Fixed bug #34064 (arr[] as param to function is allowed only if function
http://cvs.php.net/diff.php/Zend/zend_execute.c?r1=1.316.2.49.2.8&r2=1.316.2.49.2.9&ty=u
Index: Zend/zend_execute.c
diff -u Zend/zend_execute.c:1.316.2.49.2.8 Zend/zend_execute.c:1.316.2.49.2.9
--- Zend/zend_execute.c:1.316.2.49.2.8 Mon Aug 15 06:47:24 2005
+++ Zend/zend_execute.c Thu Sep 1 09:26:45 2005
@@ -266,12 +266,6 @@
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
} else if (variable_ptr != value_ptr) {
- variable_ptr->refcount--;
- if (variable_ptr->refcount==0) {
- zendi_zval_dtor(*variable_ptr);
- FREE_ZVAL(variable_ptr);
- }
-
if (!PZVAL_IS_REF(value_ptr)) {
/* break it away */
value_ptr->refcount--;
@@ -287,6 +281,12 @@
*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);
+ }
} else if (!variable_ptr->is_ref) {
if (variable_ptr_ptr == value_ptr_ptr) {
SEPARATE_ZVAL(variable_ptr_ptr);