cvs: ZendEngine2 / zend_compile.c /tests bug40899.phpt

From: Date: Fri, 23 Mar 2007 12:46:38 +0000
Subject: cvs: ZendEngine2 / zend_compile.c /tests bug40899.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5701@lists.php.net to get a copy of this message
dmitry Fri Mar 23 12:46:38 2007 UTC Modified files: /ZendEngine2 zend_compile.c /ZendEngine2/tests bug40899.phpt Log: Fixed bug #40899 (memory leak when nesting list()) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.742&r2=1.743&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.742 ZendEngine2/zend_compile.c:1.743 --- ZendEngine2/zend_compile.c:1.742 Mon Mar 12 13:07:39 2007 +++ ZendEngine2/zend_compile.c Fri Mar 23 12:46:37 2007 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.742 2007/03/12 13:07:39 tony2001 Exp $ */ +/* $Id: zend_compile.c,v 1.743 2007/03/23 12:46:37 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -3657,6 +3657,7 @@ opline->opcode = ZEND_FETCH_DIM_TMP_VAR; break; } + opline->extended_value = ZEND_FETCH_ADD_LOCK; } else { opline->opcode = ZEND_FETCH_DIM_R; } @@ -3668,7 +3669,6 @@ Z_TYPE(opline->op2.u.constant) = IS_LONG; Z_LVAL(opline->op2.u.constant) = *((int *) dimension->data); INIT_PZVAL(&opline->op2.u.constant); - opline->extended_value = ZEND_FETCH_ADD_LOCK; last_container = opline->result; dimension = dimension->next; } http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug40899.phpt?r1=1.1&r2=1.2&diff_format=u Index: ZendEngine2/tests/bug40899.phpt diff -u /dev/null ZendEngine2/tests/bug40899.phpt:1.2 --- /dev/null Fri Mar 23 12:46:38 2007 +++ ZendEngine2/tests/bug40899.phpt Fri Mar 23 12:46:38 2007 @@ -0,0 +1,9 @@ +--TEST-- +Bug #40899 (memory leak when nesting list()) +--FILE-- +<?php +list(list($a,$b),$c)=array(array('a','b'),'c'); +echo "$a$b$c\n"; +?> +--EXPECT-- +abc

« previous php.zend-engine.cvs (#5701) next »