#35156 [Opn->Csd]: Calling ob_flush after creating an ob callback causes "Segmentation fault"
| From: | tony2001@php.net | Date: | Tue, 08 Nov 2005 16:21:36 +0000 |
| Subject: | #35156 [Opn->Csd]: Calling ob_flush after creating an ob callback causes "Segmentation fault" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87865@lists.php.net to get a copy of this message | ||
ID: 35156
Updated by: tony2001@php.net
Reported By: php at kloopy dot com
-Status: Open
+Status: Closed
Bug Type: Output Control
Operating System: Win32 and Linux
PHP Version: 4.4.1
New Comment:
Marking as closed then.
Previous Comments:
------------------------------------------------------------------------
[2005-11-08 17:13:49] php at kloopy dot com
Fixed in latest PHP5 Win32 snapshop.
Also fixed in latest PHP4.4.2 Win32 snapshot.
Thanks.
------------------------------------------------------------------------
[2005-11-08 16:50:25] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-11-08 16:35:25] php at kloopy dot com
Description:
------------
When setting an output buffer that returns an empty string (I do have a
good reason for doing this), later calls to ob_flush() cause PHP to seg
fault.
Tested on PHP-4.1.1 on linux (CLI and Apache2 module) with same error
on both.
Also tested on PHP-5.0.5 on Win32 (CLI and Apache2 module) with same
error on both.
Reproduce code:
---------------
<?php
function nooutput($text) { return ""; }
print "Before\n";
ob_start("nooutput");
print "Middle\n";
ob_flush();
ob_end_flush();
print "After\n";
?>
Expected result:
----------------
Before
After
Actual result:
--------------
Before
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35156&edit=1