php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46243 segfault on looped function return
Submitted: 2008-10-06 15:59 UTC Modified: 2008-10-06 16:04 UTC
From: Marius at BudgetDedicated dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Marius at BudgetDedicated dot com
New email:
PHP Version: OS:

 

 [2008-10-06 15:59 UTC] Marius at BudgetDedicated dot com
Description:
------------
On all php versions I have available to test, including a local compile of the most recent stable (5.2.6) , using both the apache2 and cli api, I get a segfault on a looped function return. The example below is very simple and no one should make this mistake, but it must not cause php to segfault. For some structures involving complex objects and classes, returning such a loop may not always be obvious and the lack of error reporting after a segfault may make it hard to find the problem. 

Reproduce code:
---------------
<?
mySegfault();
function mySegfault(){
 return mySegfault();
}
?>



Expected result:
----------------
Error

Actual result:
--------------
Segfault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-06 16:04 UTC] scottmac@php.net
This is smashing the stack but is expected behaviour for all versions 
before 5.3.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 02:01:32 2024 UTC