php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64515 Memoryleak when using the same variablename 2times in function declaration
Submitted: 2013-03-25 20:46 UTC Modified: 2013-03-26 03:16 UTC
From: hannes dot magnusson at gmail dot com Assigned: laruence (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.4Git-2013-03-25 (Git) OS: MacOSX
Private report: No CVE-ID: None
 [2013-03-25 20:46 UTC] hannes dot magnusson at gmail dot com
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)

Patches

bug64515.patch (last revision 2013-03-26 03:13 UTC by laruence@php.net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-26 03:13 UTC] laruence@php.net
The following patch has been added/updated:

Patch Name: bug64515.patch
Revision:   1364267611
URL:        https://bugs.php.net/patch-display.php?bug=64515&patch=bug64515.patch&revision=1364267611
 [2013-03-26 03:16 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2013-03-26 03:45 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=5e9377ebd57f419de7b421878df540795ace01ef
Log: Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
 [2013-03-26 03:45 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2013-03-26 03:50 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=5e9377ebd57f419de7b421878df540795ace01ef
Log: Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
 [2013-03-26 04:03 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed315823019c8111847fb9a24293dc758ead7c3a
Log: Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
 [2013-03-26 04:03 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed315823019c8111847fb9a24293dc758ead7c3a
Log: Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
 [2013-03-26 04:03 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=5e9377ebd57f419de7b421878df540795ace01ef
Log: Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
 [2013-11-17 09:31 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed315823019c8111847fb9a24293dc758ead7c3a
Log: Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
 [2014-10-07 23:19 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=5e9377ebd57f419de7b421878df540795ace01ef
Log: Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
 [2014-10-07 23:30 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=5e9377ebd57f419de7b421878df540795ace01ef
Log: Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC