From:             sqchen at citiz dot net
Operating system: redhat 7.3
PHP version:      5.1.2
PHP Bug Type:     Streams related
Bug description:  stream_filter_register cause memory leaks

Description:
------------
stream_filter_register cause memory leaks when the php version is 5.1.2
and add --enable-debug parameter

Reproduce code:
---------------
<?php
class strtolower_filter extends php_user_filter{}
stream_filter_register("strtolower", "strtolower_filter");
$fp = fopen("foo-bar.txt", "w");
stream_filter_append($fp, "strtolower");
fwrite($fp, "Line1\n");
fwrite($fp, "WORD - 2\n");
fwrite($fp, "Easy As 123\n");
fclose($fp);
readfile("foo-bar.txt");
 ?>


Actual result:
--------------
[Thu Feb 23 13:32:38 2006]  Script:  'stream_filter_register.php'
/home/sqchen/sqchen/php-5.1.2/main/streams/filter.c(78) :  Freeing
0x083EEC14 (32 bytes), script=stream_filter_register.php
Last leak repeated 2 times
=== Total 3 memory leaks detected ===


-- 
Edit bug report at http://bugs.php.net/?id=36492&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36492&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36492&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36492&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36492&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36492&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36492&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36492&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36492&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36492&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36492&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36492&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36492&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36492&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36492&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36492&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36492&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36492&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36492&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36492&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36492&r=mysqlcfg

Reply via email to