Re: [PHP-DEV] How to debug a segmentation fault?

This is only part of a thread. view whole thread
January 30, 2020 12:47 (Benjamin Morel)
> > 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 <> wrote:
> > Sorry, I didn't notice that was > already [solved and] closed with a similar answer. > > In addition to phpspy, a tool I forgot to mention was 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. > > > has an example of what it detects