Edit report at https://bugs.php.net/bug.php?id=61541&edit=1

 ID:                 61541
 Updated by:         yohg...@php.net
 Reported by:        grzegorz129 at gmail dot com
 Summary:            Segfault using ob_clean/flush* functions in
                     output_callback function
-Status:             Open
+Status:             Assigned
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   Linux/debian lenny
-PHP Version:        5.3.10
+PHP Version:        5.3/5.4/5.5-dev
 Block user comment: N
 Private report:     N

 New Comment:

This should work. Assign to myself.


Previous Comments:
------------------------------------------------------------------------
[2012-03-28 17:49:00] grzegorz129 at gmail dot com

@reeze - thanks for patch & title suggestion.
Is there any way to catch E_PARSE? As you can see ob_* is dead end ;)

------------------------------------------------------------------------
[2012-03-28 16:42:41] reeze dot xia at gmail dot com

@grzegorz129 maybe the title can be more specific: eg: Segfault using 
ob_clean/flush* functions in output_callback function

------------------------------------------------------------------------
[2012-03-28 16:40:46] reeze dot xia at gmail dot com

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.

------------------------------------------------------------------------
[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] s...@php.net

Changed summary from "Memory leak during using ob_*"

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=61541


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61541&edit=1

Reply via email to