php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36869 ob_start memory leak
Submitted: 2006-03-27 06:43 UTC Modified: 2006-03-27 10:26 UTC
From: chen dot daqi at gmail dot com Assigned:
Status: Closed Package: Output Control
PHP Version: 5.1.2 OS: linux
Private report: No CVE-ID:
 [2006-03-27 06:43 UTC] chen dot daqi at gmail dot com
Description:
------------
ob_start memory leak when specify chunsize parameter

Reproduce code:
---------------
<?php
function callback($buffer)
{
        return $buffer;
}
var_dump(ob_start("callback", 2));
echo "Hi!abc";
?>


Expected result:
----------------
boolean(true)
Hi!abc

Actual result:
--------------
bool(true)
Hi!abc[Mon Mar 27 12:32:37 2006]  Script:  'ob_start_memory_leak.php'
/home/xlchen/php-5.1.2/main/output.c(458) :  Freeing 0x0847F8D4 (9 bytes), script=ob_start_memory_leak.php
[Mon Mar 27 12:32:37 2006]  Script:  'ob_start_memory_leak.php'
/home/xlchen/php-5.1.2/main/output.c(456) :  Freeing 0x0846D384 (16 bytes), script=ob_start_memory_leak.php
=== Total 2 memory leaks detected ===


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-27 10:26 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 16:02:23 2014 UTC