[Ad-dev] [ADIC] #55: memory leaks in AST traversal implementations
ADIC
trac at mcs.anl.gov
Fri Jul 15 09:46:15 CDT 2011
#55: memory leaks in AST traversal implementations
-----------------------------+----------------------------------------------
Reporter: utke | Owner: narayanan
Type: defect | Status: new
Priority: major | Milestone:
Component: OA/Sage to XAIF | Version:
Keywords: |
-----------------------------+----------------------------------------------
in the traversal code inherited attributes are returned by value but in
the ADIC implementation they are locally "new"ed up without being deleted
anywhere. For example:
SynthesizedXAIFInfo
XAIFGlobalTraverse::sageToGraph(SgGlobal *node, InheritedXAIFContext
inh,
SynthesizedAttributesList st)
{
SynthesizedXAIFInfo *dsptr = new SynthesizedXAIFInfo();
next_avail_index = 0;
next_avail_edge = 0;
//vv.clear();
debugMsg(5, "XAIFGlobalTraverse::sageToGraph(non-string)
needtocallAD is " << needtocallAD);
dsptr->needtocallAD = needtocallAD;
return *dsptr;
}
--
Ticket URL: <http://trac.mcs.anl.gov/projects/ADIC/ticket/55>
ADIC <http://trac.mcs.anl.gov/projects/ADIC>
ADIC: Automatic Differentiation for C and C++
More information about the Ad-dev
mailing list