Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000716XdebugDebug client (console)public2011-09-08 03:152011-09-08 10:01
Reporteralonagar 
Assigned Toderick 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionnot fixable 
Platform64 bitOSwindowsOS Version7
Product Version2.1.0 
Target VersionFixed in Version 
Summary0000716: crash with no report when nesting function is very high
DescriptionI am using `simple HTML DOM parser` library which uses heavy recursive calls.
in the beginning I had the error `PHP Fatal error: Maximum function nesting level of '100' reached` so I had raised the xdebug.max_nesting_level to 1000 and than to 2000 and even to 5000.

the script worked fine. but when I had tried to crawl large HTML files the script crashed (stopped working) with no explain.

it took me a while to realize that the high recursive call make it to crash.
and more day to disable Xdebug.


  
Steps To Reproducejust try to use recursive call more than 5000....
you should get the crash.

if you still fail to do reproduce:
you may use `simple HTML DOM parser` to crawl and parse www.oemtechnology.com.
first of all you will get `PHP Fatal error: Maximum function nesting..` and when you'll raise the max_nesting_level to 5000 the script will crash with no error
Additional InformationI am using wamp
APACHE: 2.2.11
PHP: 5.3.5
MySql: 5.1.36
TagsNo tags attached.
Operating Systemwindows 7
PHP Version5.3.5
Attached Files

- Relationships

-  Notes
(0001799)
derick (administrator)
2011-09-08 10:01

Uhm, I think you fail to understand what the max_function_level setting is for. It's exactly to protect against stack overflow that makes your script crash. Without Xdebug, it will happen a bit later perhaps. But having 5000 recursive function calls is a bad design in your library and if your HMTL files get larger, it *will* crash again. And this time Xdebug isn't there to tell you your library is crap.

- Issue History
Date Modified Username Field Change
2011-09-08 03:15 alonagar New Issue
2011-09-08 10:01 derick Note Added: 0001799
2011-09-08 10:01 derick Status new => resolved
2011-09-08 10:01 derick Resolution open => not fixable
2011-09-08 10:01 derick Assigned To => derick


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker