php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33083 Segmentation fault on recursive set_error_handler calls
Submitted: 2005-05-20 16:29 UTC Modified: 2005-05-20 16:51 UTC
Votes:3
Avg. Score:4.3 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:3 (100.0%)
From: ron at nexweb dot ca Assigned:
Status: Wont fix Package: Unknown/Other Function
PHP Version: 5.0.4 OS: Linux 2.4.28
Private report: No CVE-ID: None
 [2005-05-20 16:29 UTC] ron at nexweb dot ca
Description:
------------
PHP gives a Segmentation fault on execution of the code below...
The logic error is obvious but in application this may happen...

Reproduce code:
---------------
#!/usr/local/bin/php -c/usr/local/php/lib/php.ini
<?php
function err_handler($errno, $errstr, $errfile, $errline)
{
	createAnotherError();
}
function createAnotherError()
{
	set_error_handler("err_handler");
	trigger_error("error 2");
}
	set_error_handler("err_handler");
	trigger_error("error 1");	
?>


Expected result:
----------------
An error message maybe that tells recursivity or tells error happen in error handler...

Actual result:
--------------
Segmentation fault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-20 16:51 UTC] tony2001@php.net
There is no protection against infinite resursion.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 13:01:28 2024 UTC