Bug #61541 [Com]: Segfault using ob_*
| From: | reeze dot xia at gmail dot com | Date: | Wed, 28 Mar 2012 16:40:46 +0000 |
| Subject: | Bug #61541 [Com]: Segfault using ob_* | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-168931@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61541&edit=1
ID: 61541
Comment by: reeze dot xia at gmail dot com
Reported by: grzegorz129 at gmail dot com
Summary: Segfault using ob_*
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Linux/debian lenny
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
I've sent a pull request to fix this. @see https://github.com/php/php-src/pull/25
this makes php raise fatal error instead of segfault.
This seems to be a logic error when clean/flush output will cause the callback
called and then endless function call.
Previous Comments:
------------------------------------------------------------------------
[2012-03-28 15:09:36] grzegorz129 at gmail dot com
Test script can be even simplier:
<?php
ob_start('foo');
function foo() { ob_end_clean(); }
?>
------------------------------------------------------------------------
[2012-03-28 14:51:09] sixd@php.net
Changed summary from "Memory leak during using ob_*"
------------------------------------------------------------------------
[2012-03-28 11:48:46] grzegorz129 at gmail dot com
Description:
------------
I've trying to catch E_PARSE but trying to run sample code results only in
segfault.
Test script:
---------------
<?php
ob_start('phpErrorHandler');
function phpErrorHandler($output) {
ob_end_clean();
echo "abc";
die("def");
}
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61541&edit=1