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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Mon Apr 29 23:01:28 2024 UTC