#40089 [NEW]: memory leak in fgetcsv
| From: | zibi at nora dot pl | Date: | Wed, 10 Jan 2007 13:29:33 +0000 |
| Subject: | #40089 [NEW]: memory leak in fgetcsv | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-107418@lists.php.net to get a copy of this message | ||
From: zibi at nora dot pl
Operating system: linux
PHP version: 5.2.0
PHP Bug Type: Streams related
Bug description: memory leak in fgetcsv
Description:
------------
It looks like fgetcsv didn't free memory used for input buffer.
Reproduce code:
---------------
$f=fopen('file.csv','r');
$prev=memory_get_usage();
while($line=fgetcsv($f))
{
unset($line);
$now=memory_get_usage();
echo ($now-$prev);
$prev=$now;
}
Expected result:
----------------
0
0
0
0
0
0
0
0
0
or something oscilated around 0
Actual result:
--------------
2096
2088
2088
2088
2064
2072
2072
2072
2048
2092
--
Edit bug report at http://bugs.php.net/?id=40089&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40089&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40089&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40089&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40089&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40089&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40089&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40089&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40089&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40089&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40089&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40089&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40089&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40089&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40089&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40089&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40089&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40089&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40089&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40089&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40089&r=mysqlcfg