Date: 07/09/00
- Next message: Jouni Ahto: "Re: [PHP-DEV] Extending PHP"
- Previous message: thies <email protected>: "Re: [PHP-DEV] *crash* on try to find out how many nesting levels are allowed"
- In reply to: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nesting levelsare allowed"
- Next in thread: waldschrott: "Re: [PHP-DEV] *crash* on try to find out how many nesting levels are allowed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 9 Jul 2000, Shane Caraveo wrote:
>
>
> Stanislav Malyshev wrote:
> >
> > w>> I wanted to find out how many nesting levels are allowed, but after
> > w>> class "a" gets instanciated from inside of "b", PHP crashes, that should
> > w>> not be.
> >
> > And what did you expect? You tried to crash it, you succeeded. Infinite
> > recursion leads to crash. Try it in C, you get the same.
>
> That's an entirely lame attitude. The goal here should be a stable php,
> irregardless of the quality of code php is running. In the case of
> infinite loops, recursions, etc., php can either throw an error if it is
> somehow recognizable, or it can simply timeout. Allowing it to crash
> because 'infinite recursion leads to crash' is pathetic. If it crashes,
> it can be fixed.
As a matter of fact, it can't be. There's no way to recover from stack
overflows in UNIX, you can't really tell for sure (in a reasonable,
portable way) how much stack space you have left, and even if you could
tell, it would be way too slow and clumsy to protect against it.
Zeev
-- Zeev Suraski <zeev <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jouni Ahto: "Re: [PHP-DEV] Extending PHP"
- Previous message: thies <email protected>: "Re: [PHP-DEV] *crash* on try to find out how many nesting levels are allowed"
- In reply to: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nesting levelsare allowed"
- Next in thread: waldschrott: "Re: [PHP-DEV] *crash* on try to find out how many nesting levels are allowed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

