Deep recursion in a PHP script could cause a memory exhaustion. With memprof, deep recursion could cause a stack overflow instead, because memprof forces the VM to use recursion. This makes memprof unhelpful for these cases.
Memprof should add a recursion limit or stop relying on recursion.
Description
Deep recursion in a PHP script could cause a memory exhaustion. With memprof, deep recursion could cause a stack overflow instead, because memprof forces the VM to use recursion. This makes memprof unhelpful for these cases.
Memprof should add a recursion limit or stop relying on recursion.