Opened 14 years ago

Closed 14 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 waltweltonlair, 14 years ago

Status: newassigned

comment:2 by waltweltonlair, 14 years ago

Resolution: fixed
Status: assignedclosed

Fix in trunk with r5294.

Note: See TracTickets for help on using tickets.