RyanLynch
Joined: 03/15/10
Posts: 3 |
Stack Overflow possible in logger.cfc
03/15/10 1:37 PM
Coldbox Version: 2.6.4
Server Details:
Server Product: ColdFusion
Version: 9,0,0,251028
Edition: Developer
Operating System: Windows XP
OS Version: 5.1
Adobe Driver Version: 4.0 (Build 0005)
Description:
An infinite recursive loop in logger.cfc resulting in a stack overflow. (see first trace in attached file).
Cause:
Within the logEntry function (starts at coldbox.system.plugins.logger, line 249) there is a call to the checkRotation function (starts coldbox.system.plugins.logger, line 482; called at line 280) to rotate and archive log files. Within the check rotation function there is a try/catch structure, and within the catch block logEntry is called (coldbox.system.plugins.logger, line 517). It is possible that an error occuring within the try/catch structure in checkRotation (coldbox.system.plugins.logger lines 489-515) can lead to an infinite recursion between logEntry and checkRotation, resulting eventually in a stack overflow. I commented out the try/catch structure, and determined that the error in my case that triggered the catch in checkRotation was a CouldNotDeleteFileException (see second trace in attached file), however it's possible that any error triggering the catch could lead to an infinite loop.
|