Bug #64515 [NEW]: Memoryleak when using the same variablename 2times in function declaration
| From: | hannes dot magnusson at gmail dot com | Date: | Mon, 25 Mar 2013 20:46:37 +0000 |
| Subject: | Bug #64515 [NEW]: Memoryleak when using the same variablename 2times in function declaration | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-178085@lists.php.net to get a copy of this message | ||
From: hannes dot magnusson at gmail dot com
Operating system: MacOSX
PHP version: 5.4Git-2013-03-25 (Git)
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Memoryleak when using the same variablename 2times in function declaration
Description:
------------
There is a memory leak when the same argument name is used 2 times in a
function
declaration.
Test script:
---------------
<?php
function foo($unused = null, $unused = null, $bar = array()) {
return 1;
}
foo();
Actual result:
--------------
==67447== 32 bytes in 1 blocks are definitely lost in loss record 17 of 94
==67447== at 0x4DC7: malloc (vg_replace_malloc.c:266)
==67447== by 0x1002800CE: _emalloc (zend_alloc.c:2423)
==67447== by 0x100318565: ZEND_RECV_INIT_SPEC_CONST_HANDLER
(zend_vm_execute.h:1358)
==67447== by 0x100300796: execute (zend_vm_execute.h:410)
==67447== by 0x1002BFCBA: zend_execute_scripts (zend.c:1315)
==67447== by 0x1002108AF: php_execute_script (main.c:2492)
==67447== by 0x10037E106: do_cli (php_cli.c:988)
==67447== by 0x10037CE3A: main (php_cli.c:1364)
--
Edit bug report at https://bugs.php.net/bug.php?id=64515&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64515&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64515&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64515&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64515&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64515&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64515&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64515&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64515&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64515&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64515&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64515&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64515&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64515&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64515&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64515&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64515&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64515&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64515&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64515&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64515&r=mysqlcfg