From: maddog2k at maddog2k dot net
Operating system: Linux
PHP version: 4.4.1
PHP Bug Type: Output Control
Bug description: Calling ob_flush after creating an ob callback causes
"Segmentation fault"
Description:
------------
This is a copy of bug #35156, which is closed...
The code there still segfaults with php4-STABLE-200511160748 (combined
with at least Apache 2.0.54/.55).
I disabled Zend Optimizer, no change.
I've put ob_* functions now into 'disabled_functions' and the logs (Shared
Hosting Server) remain free from Segmentation faults.
Reproduce code:
---------------
(taken from bug #35156)
<?php
function nooutput($text) { return ""; }
print "Before\n";
ob_start("nooutput");
print "Middle\n";
ob_flush();
ob_end_flush();
print "After\n";
?>
Expected result:
----------------
(taken from bug #35156)
Before
After
Actual result:
--------------
Apache child Segmentation fault
[Thu Nov 17 11:08:59 2005] [notice] child pid 4657 exit signal
Segmentation fault (11)
--
Edit bug report at http://bugs.php.net/?id=35257&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35257&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=35257&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=35257&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35257&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35257&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35257&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35257&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35257&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35257&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35257&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35257&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35257&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35257&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35257&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35257&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35257&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35257&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35257&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35257&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35257&r=mysqlcfg