php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46102 getenv() memory leak
Submitted: 2008-09-17 04:17 UTC Modified: 2008-10-31 15:55 UTC
From: jim at centerfuse dot net Assigned:
Status: Closed Package: Performance problem
PHP Version: 5.2.6 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jim at centerfuse dot net
New email:
PHP Version: OS:

 

 [2008-09-17 04:17 UTC] jim at centerfuse dot net
Description:
------------
getenv() appears to cause a memory leak on Windows XP, 5.2.5. Could not reproduce on FreeBSD 4/PHP 5.0.5. It seems to only happen in the Apache module - the CLI exhibits the expected behavior.

Reproduce code:
---------------
echo memory_get_usage() . '<br /><br />';
		for ( $j = 0; $j < 100; $j++ ) {
			@getenv('SCRIPT_NAME');
			echo memory_get_usage() . '<br />';
		}
		


Expected result:
----------------
memory_get_usage() should report the same amount through all iterations

Actual result:
--------------
memory_get_usage() reports the same amount for the first 28 iterations, then begins to climb and continues to climb

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-24 21:04 UTC] ilia dot cheishvili at gmail dot com
This does not occur on the latest CVS checkout of 5.3.0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 19:01:31 2024 UTC