php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #32953 ob calls into ob handler
Submitted: 2005-05-05 12:20 UTC Modified: 2005-05-16 21:28 UTC
From: momo@php.net Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.3.11, 5.0.4 OS: RHEL 3
Private report: No CVE-ID: None
 [2005-05-05 12:20 UTC] momo@php.net
Description:
------------
the bellow generating Segmentation fault on both 4.3.11, 5.0.4

the gdb trace looks like infinit recursive.

Reproduce code:
---------------
<?
ob_start(create_function("","ob_end_flush();"));echo "123";
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-11 21:59 UTC] tony2001@php.net
What do you expect to get instead?
ob_end_flush() calls output handler, which in turn calls ob_end_flush() and so on.

You'll get the same result with this code:
<?php
function f() {
   f();
}
f();
?>
 [2005-05-15 13:36 UTC] momo@php.net
It was nice if php will dedect the recursive and take the control before the segfault, and generate modest error message.
if for any reason thats not possible, preventing call of the error hander function within the the same error handler function 'll be handy.
 [2005-05-16 21:28 UTC] derick@php.net
Same reasons as why we won't protect against infinity recursion.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 13:01:27 2024 UTC