cvs: ZendEngine2(PHP_5_1) / zend_vm_def.h zend_vm_execute.h /tests bug36303.phpt php-src NEWS
| From: | Dmitry Stogov | Date: | Mon, 06 Feb 2006 11:45:57 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_1) / zend_vm_def.h zend_vm_execute.h /tests bug36303.phpt php-src NEWS | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4568@lists.php.net to get a copy of this message | ||
dmitry Mon Feb 6 11:45:57 2006 UTC
Added files: (Branch: PHP_5_1)
/ZendEngine2/tests bug36303.phpt
Modified files:
/php-src NEWS
/ZendEngine2 zend_vm_def.h zend_vm_execute.h
Log:
Fixed bug #36303 (foreach on error_zval produces segfault)
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.402&r2=1.2027.2.403&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.402 php-src/NEWS:1.2027.2.403
--- php-src/NEWS:1.2027.2.402 Mon Feb 6 10:16:03 2006
+++ php-src/NEWS Mon Feb 6 11:45:55 2006
@@ -20,6 +20,7 @@
- Added imap_savebody() that allows message body to be written to a file. (Mike)
- Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
on error. (Pierre)
+- Fixed bug #36303 (foreach on error_zval produces segfault). (Dmitry)
- Fixed bug #36295 (typo in SplFileObject::flock() parameter name). (Tony)
- Fixed bug #36287 (Segfault with SplFileInfo conversion). (Marcus)
- Fixed bug #36283 (SOAPClient Compression Broken). (Dmitry)
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.22&r2=1.59.2.23&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.22 ZendEngine2/zend_vm_def.h:1.59.2.23
--- ZendEngine2/zend_vm_def.h:1.59.2.22 Wed Jan 4 23:53:04 2006
+++ ZendEngine2/zend_vm_def.h Mon Feb 6 11:45:55 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.59.2.22 2006/01/04 23:53:04 andi Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.23 2006/02/06 11:45:55 dmitry Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -2983,7 +2983,9 @@
}
array_ptr = *array_ptr_ptr;
} else {
- SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) {
+ SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ }
array_ptr = *array_ptr_ptr;
array_ptr->refcount++;
}
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.23&r2=1.62.2.24&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.23 ZendEngine2/zend_vm_execute.h:1.62.2.24
--- ZendEngine2/zend_vm_execute.h:1.62.2.23 Wed Jan 4 23:53:04 2006
+++ ZendEngine2/zend_vm_execute.h Mon Feb 6 11:45:56 2006
@@ -2030,7 +2030,9 @@
}
array_ptr = *array_ptr_ptr;
} else {
- SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) {
+ SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ }
array_ptr = *array_ptr_ptr;
array_ptr->refcount++;
}
@@ -4446,7 +4448,9 @@
}
array_ptr = *array_ptr_ptr;
} else {
- SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) {
+ SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ }
array_ptr = *array_ptr_ptr;
array_ptr->refcount++;
}
@@ -7444,7 +7448,9 @@
}
array_ptr = *array_ptr_ptr;
} else {
- SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) {
+ SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ }
array_ptr = *array_ptr_ptr;
array_ptr->refcount++;
}
@@ -19539,7 +19545,9 @@
}
array_ptr = *array_ptr_ptr;
} else {
- SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) {
+ SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
+ }
array_ptr = *array_ptr_ptr;
array_ptr->refcount++;
}
http://cvs.php.net/viewcvs.cgi/ZendEngine2/tests/bug36303.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug36303.phpt
+++ ZendEngine2/tests/bug36303.phpt