Bug #70653 [Opn->Nab]: Segfault on MultipleIterator

From: Date: Tue, 06 Oct 2015 20:06:17 +0000
Subject: Bug #70653 [Opn->Nab]: Segfault on MultipleIterator
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196438@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 Updated by: requinix@php.net Reported by: admin at shuguenot dot fr Summary: Segfault on MultipleIterator -Status: Open +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: 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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#196438) next »