php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44883 Endless Recursion Ends quickly, throws no error
Submitted: 2008-05-01 18:36 UTC Modified: 2008-05-03 03:42 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: kevin at creativeanvil dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.2.5 OS: RHEL 4x
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: kevin at creativeanvil dot com
New email:
PHP Version: OS:

 

 [2008-05-01 18:36 UTC] kevin at creativeanvil dot com
Description:
------------
Basically my script was ending in the middle and output at the end of the script was not outputted.  This was due to a coding error, however I believe a PHP error should have been thrown because PHP terminated the request at some point.  It was a stupid mistake, however not the easiest to track down.

The code isn't my actual code, but it will reproduce what I think is a problem.

Reproduce code:
---------------
<?php
$c=0;
function recursiveTest() {
	global $c;
	echo $c++."<br>";
	recursiveTest();
}
recursiveTest();
?>

Expected result:
----------------
I would expect it to go on until memory limit is reached, throwing an error, max execution time reached, throwing an error, or something that throws an error.

In my environment it gets to 19456 and stops everytime, no error is given and it stops very quicky.

ENDLESS RECURSION ERROR.

Some kind of error.

Actual result:
--------------
1
2
3
....
19456

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-03 03:42 UTC] felipe@php.net
Bug #29242
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 19:01:31 2024 UTC