[fdo-trac] #616: ExpressionEngine leaks memory with invalid expressions

FDO trac_fdo at osgeo.org
Mon Feb 15 18:19:04 EST 2010


#616: ExpressionEngine leaks memory with invalid expressions
------------------------------+---------------------------------------------
   Reporter:  waltweltonlair  |       Owner:  waltweltonlair
       Type:  defect          |      Status:  new           
   Priority:  major           |   Milestone:  3.6.0         
  Component:  FDO API         |     Version:  3.5.0         
   Severity:  3               |    Keywords:                
External_id:                  |  
------------------------------+---------------------------------------------
 Valgrind reports a large memory leak when running the !MapGuide rendering
 service unit test.  The leak is in the FDO expression engine, and it
 occurs when processing an invalid expression.  In the case of !MapGuide
 the invalid expression simply has double quotes around a constant string
 instead of single quotes.

 The leak occurs in FdoExpressionEngineImp::!ProcessFunction.  An
 !FdoLiteralValueCollection is obtained via a call to
 !ObtainLiteralValueCollection(), and then the expression arguments are
 processed.  In the case of an invalid expression an exception is raised,
 and the !FdoLiteralValueCollection object's ref count is mismanaged
 resulting in an eventual leak.

 In the !MapGuide unit test one !FdoLiteralValueCollection object is leaked
 for each feature being processed - 11580 total leaked objects for about a
 3/4 Mb leak.  In the case of a user accidentally configuring an incorrect
 expression this would eventually lead to the !MapGuide server running out
 of memory.

-- 
Ticket URL: <https://trac.osgeo.org/fdo/ticket/616>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list