Re: PHP 4.0 Bug #7720 Updated: Return address in stackoverwritten?
| From: | Adam Wright | Date: | Thu, 09 Nov 2000 12:54:54 +0000 |
| Subject: | Re: PHP 4.0 Bug #7720 Updated: Return address in stackoverwritten? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-37537@lists.php.net to get a copy of this message | ||
You can't do infinite recursions in PHP, for obvious reasons. It doesnt work
in any other sane language either. Try
void function() {
int i;
function();
}
in C, and marvel as you run out of stack. This isnt a bug in PHP, though its
not handled that gracefully. 10,000 recursions is an awful lot anyway, and
you should look at other methods to accomplish your goal (think of the
memory usage even if you had enough stack!), imho.
adamw
----- Original Message -----
From: "void" <sven@devcon.net>
To: "Stanislav Malyshev" <stas@zend.com>
Cc: <derick@php.net>; <php-dev@lists.php.net>
Sent: Thursday, November 09, 2000 12:47 PM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in
stackoverwritten?
> Hi,
>
> On Thu, 9 Nov 2000, Stanislav Malyshev wrote:
>
> > v>> I want some 10.000 recursions no infinte ones. I get about 6.000
> > v>> then its over. I can't work like this. Fix it please.
> >
> > I'm afraid PHP team cannot fix it. You just get out of the available
> > stack. Unroll your recursion to a loop - anyway a wise move if you have
so
> > many repeats.
>
> Go ahead and do this with your engine, eh?
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>