arnaud-lb / php-memory-profiler

Memory profiler for PHP. Helps finding memory leaks in PHP scripts.
MIT License
858 stars 51 forks source link

Prevent stack overflows #80

Open arnaud-lb opened 2 years ago

arnaud-lb commented 2 years ago

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.