slava77 / cmssw

CMS Offline Software
0 stars 0 forks source link

70X memory leak in GsfElectronAlgo::beginEvent #26

Closed slava77 closed 9 years ago

slava77 commented 10 years ago

Visible in CMSSW_7_0_X_2014-01-17-0200 (should be in 700pre12) in TTBar 40PU25ns test run

Concise report in https://slava77sk.web.cern.ch/slava77sk/reco/valgrind_70X-201412170200.txt

    2,400 bytes in 200 blocks are definitely lost in loss record 150,072 of 151,598
    2,400 bytes in 200 blocks are definitely lost in loss record 150,071 of 151,598
    2,400 bytes in 200 blocks are definitely lost in loss record 150,070 of 151,598
    2,400 bytes in 200 blocks are definitely lost in loss record 150,069 of 151,598
      operator new(unsigned long)
      GsfElectronAlgo::beginEvent(edm::Event&)
      GsfElectronBaseProducer::beginEvent(edm::Event&, edm::EventSetup const&)
      GsfElectronEcalDrivenProducer::produce(edm::Event&, edm::EventSetup const&)

    1,200 bytes in 100 blocks are definitely lost in loss record 149,420 of 151,598
    1,200 bytes in 100 blocks are definitely lost in loss record 149,419 of 151,598
    1,200 bytes in 100 blocks are definitely lost in loss record 149,418 of 151,598
    1,200 bytes in 100 blocks are definitely lost in loss record 149,417 of 151,598
      operator new(unsigned long)
      GsfElectronAlgo::beginEvent(edm::Event&)
      GsfElectronBaseProducer::beginEvent(edm::Event&, edm::EventSetup const&)
      GEDGsfElectronProducer::produce(edm::Event&, edm::EventSetup const&)

There is a missing delete for

   EgammaTowerIsolation * hadDepth1Isolation03Bc, * hadDepth1Isolation04Bc ;
   EgammaTowerIsolation * hadDepth2Isolation03Bc, * hadDepth2Isolation04Bc ;

Consider using values for these simple types or switch to unique or shared ptr

Full report in https://slava77sk.web.cern.ch/slava77sk/reco/valgrind_70X-201412170200.xml

slava77 commented 9 years ago

fixed in 72X in https://github.com/cms-sw/cmssw/pull/5159