Bug #70653 [Nab]: Segfault on MultipleIterator
| From: | admin at shuguenot dot fr | Date: | Tue, 06 Oct 2015 20:09:39 +0000 |
| Subject: | Bug #70653 [Nab]: Segfault on MultipleIterator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-196439@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70653&edit=1
ID: 70653
User updated by: admin at shuguenot dot fr
Reported by: admin at shuguenot dot fr
Summary: Segfault on MultipleIterator
Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Ubuntu 14
PHP Version: 5.6.14
Block user comment: N
Private report: N
New Comment:
Ok and many thanks.
I think this task can be closed..
Previous Comments:
------------------------------------------------------------------------
[2015-10-06 20:06:14] requinix@php.net
It's not possible for PHP to analyze code and tell when the code has created infinite
recursion, which is the situation here. It will diligently execute exactly what it is told to and
will only quit when it runs out of stack space (or memory or some other resource) and is forced to
terminate.
If you need something to alert you to possible infinite recursion during development then try the
Xdebug extension and its max_nesting_level setting.
------------------------------------------------------------------------
[2015-10-06 18:50:17] admin at shuguenot dot fr
Description:
------------
If I make a MultipleIterator and override the current function with that :
public function current()
{
$this->current();
}
I know that it's not a well code and this doesn't work and hasn't to be done but
maybe it could have something else than a Segfault.
Test script:
---------------
class QuestionsIterator extends \MultipleIterator implements \Iterator {
public function current()
{
$this->current();
}
}
Expected result:
----------------
An error or an exception maybe
Actual result:
--------------
Segmentation Fault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70653&edit=1