#40899 [NEW]: memory leak when nesting list()
| From: | cweiske at cweiske dot de | Date: | Fri, 23 Mar 2007 07:31:08 +0000 |
| Subject: | #40899 [NEW]: memory leak when nesting list() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-110707@lists.php.net to get a copy of this message | ||
From: cweiske at cweiske dot de
Operating system: Linux
PHP version: 5.2.1
PHP Bug Type: Arrays related
Bug description: memory leak when nesting list()
Description:
------------
I get memory leaks when nesting list() statements to assign array
variables to local variables. I get no leaks if list() is not nested.
Reproduce code:
---------------
php -a
Interactive shell
php > list(list($a,$b),$c)=array(array('a','b'),'c');
php > quit
Expected result:
----------------
Nothing.
Actual result:
--------------
[Fri Mar 23 08:28:26 2007] Script: '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(3533)
: Freeing 0x08923060 (16 bytes), script=-
Last leak repeated 1 time
[Fri Mar 23 08:28:26 2007] Script: '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(6308)
: Freeing 0x0892323C (16 bytes), script=-
[Fri Mar 23 08:28:26 2007] Script: '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(3578)
: Freeing 0x08923620 (44 bytes), script=-
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_API.c(819)
: Actual location (location was relayed)
Last leak repeated 1 time
[Fri Mar 23 08:28:26 2007] Script: '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_variables.h(45)
: Freeing 0x089236C4 (2 bytes), script=-
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_variables.c(120)
: Actual location (location was relayed)
Last leak repeated 1 time
[Fri Mar 23 08:28:26 2007] Script: '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(3564)
: Freeing 0x089236F4 (35 bytes), script=-
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_hash.c(388)
: Actual location (location was relayed)
Last leak repeated 1 time
=== Total 9 memory leaks detected ===
--
Edit bug report at http://bugs.php.net/?id=40899&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40899&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40899&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40899&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40899&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40899&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40899&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40899&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40899&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40899&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40899&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40899&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40899&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40899&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40899&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40899&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40899&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40899&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40899&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40899&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40899&r=mysqlcfg