php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34353 func_get_arg(s) leak
Submitted: 2005-09-02 22:55 UTC Modified: 2005-09-03 09:37 UTC
From: devik at cdi dot cz Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.1.0RC1 OS: Linux
Private report: No CVE-ID: None
 [2005-09-02 22:55 UTC] devik at cdi dot cz
Description:
------------
There is missing INIT_PZVAL(return_value);
at end of zif_func_get_arg thus it is leaking
data.

Reproduce code:
---------------
<?php
function f()
{
        echo func_get_arg(0);
}               
$a=$b=2;
f($a);
?>


Expected result:
----------------
2/copy/build/php-5.1.0RC1/Zend/zend_vm_execute.h(167) :  Freeing 0x08466324 (16 bytes), script=tst.php
=== Total 1 memory leaks detected ===

Actual result:
--------------
2

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-02 23:29 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

I can not reproduce with latest CVS checkout of PHP_5_1 branch.

 [2005-09-03 09:37 UTC] devik at cdi dot cz
Oh ok, sorry - I found it is already fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 13:00:03 2025 UTC