php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49356 Memory leak in date_create()
Submitted: 2009-08-25 12:31 UTC Modified: 2009-08-26 09:11 UTC
From: lundstrom dot jerry at gmail dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.3.0 OS: Ubuntu Jaunty
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lundstrom dot jerry at gmail dot com
New email:
PHP Version: OS:

 

 [2009-08-25 12:31 UTC] lundstrom dot jerry at gmail dot com
Description:
------------
Looping date_create() leaks memory even if you unset the object and has set a date.timezone.

Reproduce code:
---------------
<?
ini_set('date.timezone', 'Europe/Stockholm');

while(1)
{
    $date = date_create('2008-01-01');
    unset($date);
}

?>

Expected result:
----------------
No increase in memory usage.


Actual result:
--------------
Grows around 100-150meg per sec.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-25 12:44 UTC] derick@php.net
Please try using this snapshot:

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

  http://windows.php.net/snapshots/

I can can reproduce this in 5.3.0, but not with 5.3.1-dev.
 [2009-08-26 09:07 UTC] lundstrom dot jerry at gmail dot com
I can confirm the fix as of php5.3-200908251230.

When will the next 5.3 version be released?
 [2009-08-26 09:11 UTC] jani@php.net
When it's ready.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Dec 02 08:00:01 2025 UTC