From: Operating system: All PHP version: 5.4.0 Package: *General Issues Bug Type: Bug Bug description:debug_backtrace() crashes if it has to return too large data
Description: ------------ version 5.3.3.7 So the problem is that I use debug_backtrace() for logging, when an error occurs, so that I have record of what happened and where. The problem is that if you are using for example Zend framework, and a couple of huge objects are encountered, then PHP basically crashes (nothing is logged in the error log, no error output is produced, only a blank output). This is probably because of the lack of memory. Yes, I know that I should use the ..._PROVIDE_OBJECT flag to skip them, but that's the point. I don't want to. Because I need it 99% of the time, but sometimes I get these huge backtraces which makes PHP fail. So there should either be a way to check how big the output debug_backtrace() produces, (so that I will know when not to execute it), or it should return FALSE if there is not enough memory to store the result or something similar no? You added the limit parameter in PHP 5.4 I can see that, but that still doesn't guarantee you that you will have enough memory to get results of this function. It can still cause a crash. -- Edit bug report at https://bugs.php.net/bug.php?id=61476&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61476&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61476&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61476&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61476&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61476&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61476&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61476&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61476&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61476&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61476&r=support Expected behavior: https://bugs.php.net/fix.php?id=61476&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61476&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61476&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61476&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61476&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=61476&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61476&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61476&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61476&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61476&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61476&r=mysqlcfg