>
> Infinite recursion leading to a segfault is **a known bug with no plans to
> be fixed that I know of,** which I've encountered many times.


That's unfortunate; as I said in the bug report, it's so easy to trigger
and so easy to miss when reviewing the code! And the process crashing
instead of reporting an error is really a pity.
An explicit error message would be nice, but as I understand this would
require setting a hard limit on the call stack depth, which may bring other
issues.

Thank you,
— Benjamin

On Thu, 30 Jan 2020 at 03:59, tyson andre <tysonandre...@hotmail.com> wrote:

> > Sorry, I didn't notice that https://bugs.php.net/bug.php?id=79194 was
> already [solved and] closed with a similar answer.
>
> In addition to phpspy, a tool I forgot to mention was Phan. (
> https://github.com/phan/phan)
>
> `phan --redundant-condition-detection` will enable many of Phan's checks,
> including code that looks like a function or method calling itself
> unconditionally, or with the same args.
> I got the idea for adding a check for PhanInfiniteRecursion
> (and PhanPossiblyInfiniteRecursionSameParams) after investigating a similar
> segfault over a year ago ago
> (and considering most of those solutions),
> to detect that type of bug before it ran.
>
> https://github.com/phan/phan/blob/master/internal/Issue-Types-Caught-by-Phan.md#phaninfiniterecursion
> has an example of what it detects

Reply via email to