Opened 15 years ago
Closed 15 years ago
#616 closed defect (fixed)
ExpressionEngine leaks memory with invalid expressions
Reported by: | waltweltonlair | Owned by: | waltweltonlair |
---|---|---|---|
Priority: | major | Milestone: | 3.6.0 |
Component: | FDO API | Version: | 3.5.0 |
Severity: | 3 | Keywords: | |
Cc: | External ID: |
Description
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.
Change History (2)
comment:1 by , 15 years ago
Status: | new → assigned |
---|
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix in trunk with r5294.