# php.exe crashes on infinite recursion (PHP 5.3.5)

- Thread: https://externals.io/message/54788
- Original archive: https://news-web.php.net/php.internals/54788
- Started by speedy on 2011-08-22T10:27:27+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #54788 — speedy — 2011-08-22T10:27:27+00:00

URL: https://externals.io/message/54788#54788

Hello PHP dev crew,

      The screenshot of the crash is in the attachment.

      The problem is easily reproducible, just make a PHP function
      call itself.

      I think the stack grows too big and the php interpreter crashes
      inside the MSVCRT.dll.

      Maybe it could be handled with more grace? I feel that
      high level language interpreter should not crash its process
      whatever I do in the php code. Throwing a stack overflow / memory exausted
      exception would make it much easier to debug.

      Cheers,
      Milan
  

-- 
Best regards,
 speedy                          mailto:speedy.spam@gmail.com

---

## #54789 — Ferenc Kovacs — 2011-08-22T10:33:03+00:00

URL: https://externals.io/message/54788#54789 · In reply to: #54788

> Hello PHP dev crew,
>
>      The screenshot of the crash is in the attachment.
>
>      The problem is easily reproducible, just make a PHP function
>      call itself.
>
>      I think the stack grows too big and the php interpreter crashes
>      inside the MSVCRT.dll.
>
>      Maybe it could be handled with more grace? I feel that
>      high level language interpreter should not crash its process
>      whatever I do in the php code. Throwing a stack overflow / memory exausted
>      exception would make it much easier to debug.
>
>      Cheers,
>      Milan
>
>
> --
> Best regards,
>  speedy                          mailto:speedy.spam@gmail.com
>
> --
> 
> 
>

Hi.

the mailing list only accept attachments with txt as an extension.
the problem itself is known, and marked as bogus/wontfix:
https://bugs.php.net/bug.php?id=51350

:(

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

---

## #54791 — Kalle Sommer Nielsen — 2011-08-22T10:38:52+00:00

URL: https://externals.io/message/54788#54791 · In reply to: #54788

2011/8/22 speedy <speedy.spam@gmail.com>:
> Hello PHP dev crew,
>
>      The screenshot of the crash is in the attachment.
>
>      The problem is easily reproducible, just make a PHP function
>      call itself.

Infinite recursions have always crashed, while Dmitry patched some of
those in the early 5.3 development it wasn't possible to cover all
cases and there are many still existing. Such as:
class A { public function __destruct() { new self; } } new A;

They should all give out a memory limit error, but fixing such a thing
don't have a big priority and is most likely to get marked as Bogus.
Also check the database if you choose to report it, as there would be
no need to open a new report if an already existing one is open or if
one recently have been closed.

-- 
regards,

Kalle Sommer Nielsen
kalle@php.net
