#47285 [Opn->Fbk]: strtotime() still leaks memory
| From: | jani@php.net | Date: | Tue, 03 Feb 2009 22:15:18 +0000 |
| Subject: | #47285 [Opn->Fbk]: strtotime() still leaks memory | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133464@lists.php.net to get a copy of this message | ||
ID: 47285
Updated by: jani@php.net
Reported By: danger at FreeBSD dot org
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: FreeBSD
PHP Version: 5.2.8
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2009-02-03 01:19:36] danger at FreeBSD dot org
Description:
------------
The strtotime() function still leaks memory in patched PHP 5.2.8 after
applying patches from http://news.php.net/php.cvs/55000. The memory leak
itself is much smaller than before applying fixes. Before, it took a few
seconds to leak 1gb of mem, now it takes some minutes however it's still
there.
This bug is related to http://bugs.php.net/bug.php?id=46889.
Reproduce code:
---------------
while (true)
{
$tmp = inc_stamp(time(), 1);
}
function inc_stamp($timestamp, $off_days)
{
return strtotime("+" . $off_days . " day", $timestamp);
}
Actual result:
--------------
Memory leak reported by top(1). If the script runs for longer time, it
gets killed by kernel since the system is going out of memory and swap.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47285&edit=1