Closed
Description
Symfony version(s) affected: 4.4.16, 5.2.6
Description
On some OOM errors the Symfony ErrorHandler itself throws an OOM error trying to handle the previous error. This is a problem as it can make handling OOM errors impossible to handle.
This is the php output:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20480 bytes) in /app/src/BugCommand.php on line 18
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /app/vendor/symfony/error-handler/Error/OutOfMemoryError.php on line 1
The second fatal error is not expected.
How to reproduce
https://github.com/tachnik/reproduce-oom-in-error-handler-bug