Memory leak in 6.14.00

Dear rooters

I’m working on a platform developped in order to deal with uncertainties, optimisation, surrogate model… We’re building our platform based on ROOT and we recently move to root 6 (Yeah !) which has induced many changes on our side but is working fine so far. Thanks ! :smiley:

I’m coming back to you because I’m now investigating the memory aspects (chasing down memory leak, most likely from our side :stuck_out_tongue:). After few tests I might have found two missing delete in root 6.14.00. You’ll find the log below and the solution I tried locally to patch them.

cheers
jb

in TFormula::HandleParamRanges(TString &formula)

MLK ==11623== 2,044 bytes in 511 blocks are definitely lost in loss record 3,023 of 3,688
==11623==    at 0x4A08117: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==11623==    by 0x7A3D2B0: TFormula::HandleParamRanges(TString&) (TFormula.cxx:1240)
==11623==    by 0x7A3F91A: TFormula::PreProcessFormula(TString&) (TFormula.cxx:1708)
==11623==    by 0x7A389A2: TFormula::TFormula(char const*, char const*, bool, bool) (TFormula.cxx:456)

In line 1250 - in the if(endCnt <= startCnt) - and in line 1261 I’ve just added

delete len;

in TFile::GetStreamerInfoListImpl(bool lookupSICache) in line 1341 and 1349 (before both return line) I’ve added

delete [] buffer;
delete key;

which were not done.


_ROOT Version: 6.14.00
_Platform: Linux (fedora22&26)
_Compiler: g++ (5.1 & 7.1)


May be @moneta can help you with this TFormula issue.

Not sure i understood your reply : the only thing i’m stated is that if i add a delete in TFormula this memleak vanish…

jb

Yes that’s why I asked @moneta to look at it as he is the expert of this part of ROOT.

oups… Sorry :stuck_out_tongue:
thanks
jb

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.