cvs: ZendEngine2(PHP_5_2) / zend_compile.c /tests bug38469.phpt php-src NEWS
[email protected] ("Arnaud Le Blanc")
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvslbarnaud1227472592@cvsserver> |
lbarnaud Sun Nov 23 20:36:32 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/ZendEngine2 zend_compile.c
/ZendEngine2/tests bug38469.phpt
Log:
MFH: Fixed bug #46649 (Setting array element with that same array produces
inconsistent results)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1325&r2=1.2027.2.547.2.1326&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1325 php-src/NEWS:1.2027.2.547.2.1326
--- php-src/NEWS:1.2027.2.547.2.1325 Sun Nov 23 18:31:05 2008
+++ php-src/NEWS Sun Nov 23 20:36:31 2008
@@ -2,6 +2,8 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Nov 2008, PHP 5.2.7
- Fixed memory leak inside readline_callback_handler_remove() function. (Felipe)
+- Fixed bug #46649 (Setting array element with that same array produces
+ inconsistent results). (Arnaud)
- Fixed bug #46643 (Upgraded PCRE to 7.8)
20 Nov 2008, PHP 5.2.7RC4
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.50&r2=1.647.2.27.2.51&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.50 ZendEngine2/zend_compile.c:1.647.2.27.2.51
--- ZendEngine2/zend_compile.c:1.647.2.27.2.50 Thu Jul 24 11:47:12 2008
+++ ZendEngine2/zend_compile.c Sun Nov 23 20:36:31 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.647.2.27.2.50 2008/07/24 11:47:12 dmitry Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.27.2.51 2008/11/23 20:36:31 lbarnaud Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -565,6 +565,7 @@
CG(active_op_array)->vars[value->u.var].name,
CG(active_op_array)->vars[value->u.var].name_len, 1);
SET_UNUSED(opline->op2);
+ opline->op2.u.EA.type = ZEND_FETCH_LOCAL;
value = &opline->result;
}
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug38469.phpt?r1=1.2.2.3&r2=1.2.2.4&diff_format=u
Index: ZendEngine2/tests/bug38469.phpt
diff -u ZendEngine2/tests/bug38469.phpt:1.2.2.3 ZendEngine2/tests/bug38469.phpt:1.2.2.4
--- ZendEngine2/tests/bug38469.phpt:1.2.2.3 Wed May 14 13:07:16 2008
+++ ZendEngine2/tests/bug38469.phpt Sun Nov 23 20:36:32 2008
@@ -8,6 +8,16 @@
$b = array(array());
$b[0][0] = $b;
var_dump($b);
+
+function f() {
+ $a = array();
+ $a[0] = $a;
+ var_dump($a);
+ $b = array(array());
+ $b[0][0] = $b;
+ var_dump($b);
+}
+f();
?>
--EXPECT--
array(1) {
@@ -26,3 +36,19 @@
}
}
}
+array(1) {
+ [0]=>
+ array(0) {
+ }
+}
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ array(0) {
+ }
+ }
+ }
+}