#49700 [Opn]: memory leaks in php_date.c if garbage collector is enabled
| From: | fa@php.net | Date: | Fri, 02 Oct 2009 22:44:55 +0000 |
| Subject: | #49700 [Opn]: memory leaks in php_date.c if garbage collector is enabled | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-143206@lists.php.net to get a copy of this message | ||
ID: 49700
Updated by: fa@php.net
Reported By: indeyets@php.net
Status: Open
Bug Type: Date/time related
Operating System: Mac OS X 10.6.1
PHP Version: 5.3SVN-2009-09-28 (SVN)
New Comment:
Probably Mac OS only...
Couldn't reproduce with latest snap (php5.3-200910022030) on Linux x86
without running into a memory_limit of 512 MB with CLI
Previous Comments:
------------------------------------------------------------------------
[2009-09-28 17:25:28] indeyets@php.net
Description:
------------
If garbage-collector is enabled and large quantity of DateTime objects
is created, php reports memory leaks
Reproduce code:
---------------
<?php
gc_enable();
$objs = array();
foreach (range(1,20000) as $i) {
$objs[$i] = new DateTime();
}
Expected result:
----------------
DONE
Actual result:
--------------
DONE
[Mon Sep 28 21:23:24 2009] Script: '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(1137) :
Freeing 0x106340068 (79 bytes), script=_mem_test.php
Last leak repeated 39993 times
[Mon Sep 28 21:23:24 2009] Script: '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(2088) :
Freeing 0x106340118 (32 bytes), script=_mem_test.php
Last leak repeated 39993 times
[Mon Sep 28 21:23:24 2009] Script: '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(2091) :
Freeing 0x106340198 (14 bytes), script=_mem_test.php
Last leak repeated 39993 times
[Mon Sep 28 21:23:24 2009] Script: '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(2078) :
Freeing 0x106340208 (32 bytes), script=_mem_test.php
Last leak repeated 39993 times
[Mon Sep 28 21:23:24 2009] Script: '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(2084) :
Freeing 0x106340338 (32 bytes), script=_mem_test.php
Last leak repeated 39993 times
=== Total 199970 memory leaks detected ===
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49700&edit=1