PHP (anti) crash policy?

php.internals

Olaf van der Spek

21 years ago
Hi, What is the PHP policy regaring crashes and fatal errors? Are scripts allowed to cause a crash or fatal error of Apache/PHP itself?

Derick Rethans

21 years ago
On Sun, 3 Oct 2004, Olaf van der Spek wrote:
> What is the PHP policy regaring crashes and fatal errors? > Are scripts allowed to cause a crash or fatal error of Apache/PHP itself?
Only on a stack overflow, as in: function a() { a(); } a(); Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Olaf van der Spek

21 years ago
Derick Rethans wrote:
> On Sun, 3 Oct 2004, Olaf van der Spek wrote: > >>What is the PHP policy regaring crashes and fatal errors? >>Are scripts allowed to cause a crash or fatal error of Apache/PHP itself? > > Only on a stack overflow, as in:
Are there any plans to fix/improve this situation? Isn't it possible to check stack size left before allocating a new stack frame?

Derick Rethans

21 years ago
On Sun, 3 Oct 2004, Olaf van der Spek wrote:
> Derick Rethans wrote: > > On Sun, 3 Oct 2004, Olaf van der Spek wrote: > > > >>What is the PHP policy regaring crashes and fatal errors? > >>Are scripts allowed to cause a crash or fatal error of Apache/PHP itself? > > > > Only on a stack overflow, as in: > > Are there any plans to fix/improve this situation? > Isn't it possible to check stack size left before allocating a new stack > frame?
No, this is not possible. Please read the archives for reasons. Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Olaf van der Spek

21 years ago
Derick Rethans wrote:
> On Sun, 3 Oct 2004, Olaf van der Spek wrote: > > >>Derick Rethans wrote: >> >>>On Sun, 3 Oct 2004, Olaf van der Spek wrote: >>> >>> >>>>What is the PHP policy regaring crashes and fatal errors? >>>>Are scripts allowed to cause a crash or fatal error of Apache/PHP itself? >>> >>>Only on a stack overflow, as in: >> >>Are there any plans to fix/improve this situation? >>Isn't it possible to check stack size left before allocating a new stack >>frame? > > > No, this is not possible. Please read the archives for reasons.
Do you know the subjects of the threads in which this was discussed? Searching for "stack overflow" or "infinite recursion" gives many results, but I can't find the posts in which you explained why it can't be done.

Olaf van der Spek

21 years ago
Derick Rethans wrote:
> On Sun, 3 Oct 2004, Olaf van der Spek wrote: > > >>Derick Rethans wrote: >> >>>On Sun, 3 Oct 2004, Olaf van der Spek wrote: >>> >>> >>>>What is the PHP policy regaring crashes and fatal errors? >>>>Are scripts allowed to cause a crash or fatal error of Apache/PHP itself? >>> >>>Only on a stack overflow, as in: >> >>Are there any plans to fix/improve this situation? >>Isn't it possible to check stack size left before allocating a new stack >>frame? > > > No, this is not possible. Please read the archives for reasons.
And don't you think this should be mentioned in the documentation? It's a rather important issue IMO.

Olaf van der Spek

21 years ago
Derick Rethans wrote:
> On Sun, 3 Oct 2004, Olaf van der Spek wrote: > >>What is the PHP policy regaring crashes and fatal errors? >>Are scripts allowed to cause a crash or fatal error of Apache/PHP itself? > > Only on a stack overflow, as in:
What about out of memory conditions (in for example gzinflate)?