From:             indey...@php.net
Operating system: Mac OS X 10.6.1
PHP version:      5.3SVN-2009-09-28 (SVN)
PHP Bug Type:     Date/time related
Bug description:  memory leaks in php_date.c if garbage collector is enabled

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 bug report at http://bugs.php.net/?id=49700&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49700&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49700&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49700&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49700&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49700&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49700&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49700&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49700&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49700&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49700&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49700&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49700&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49700&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49700&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49700&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49700&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49700&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49700&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49700&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49700&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49700&r=mysqlcfg

Reply via email to