Valgrind dynamic analysis

Dear all,

I am working on the Uranie platform, which is a data analysis tool based on Root. My current goal is to make its dynamic analysis return no leak.

The first problem I have is that some of the valgrind errors seems to be fully caused by Root, and do not seem to involve Uranie at all. Below is an example of the valgrind analysis of one of the Uranie modules.
Here is the command I run:

And its results:

[code]==21183== Memcheck, a memory error detector
==21183== Copyright © 2002-2009, and GNU GPL’d, by Julian Seward et al.
==21183== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==21183== Command: ./checkXMLProblem
==21183==

TXMLProblemTest::testXMLfile URANIE::WARNING
URANIE::WARNING *** URANIE WARNING ***
URANIE::WARNING *** File[/data/tmpletr/uranietm/v3_2_2_SPO/ura@nie/souRCE/dataSERVER/souRCE/TDataServer.cxx] Line[4438]
URANIE::WARNING TDataServer::getTuple Error : There is no tree!
URANIE::WARNING *** END of URANIE WARNING ***
URANIE::WARNING
: OK
==21183==
==21183== HEAP SUMMARY:
==21183== in use at exit: 5,793,862 bytes in 68,087 blocks
==21183== total heap usage: 244,982 allocs, 176,895 frees, 20,154,974 bytes allocated
==21183==
==21183== 16 bytes in 2 blocks are possibly lost in loss record 1,055 of 5,042
==21183== at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183== by 0x7B6804A: std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<int, int>, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, std::pair<int, int> const&) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7C08068: ROOT::TSchemaRule::ProcessVersion(TString const&) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7C08296: ROOT::TSchemaRule::SetVersion(TString const&) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFDAA5: ROOT::TGenericClassInfo::CreateRuleSet(std::vector<ROOT::TSchemaHelper, std::allocatorROOT::TSchemaHelper >&, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFDE51: ROOT::TGenericClassInfo::GetClass() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0xA5AD697: TTree::Dictionary() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libTree.so.5.32)
==21183== by 0x7B7D795: TROOT::LoadClass(char const
, bool) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BEEF91: TClass::GetClass(char const*, bool, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BD4F95: TBaseClass::GetClassPointer(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE3E50: TClass::GetBaseClass(TClass const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BF2318: TClass::InheritsFrom(TClass const*) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==
==21183== 16 bytes in 2 blocks are definitely lost in loss record 1,057 of 5,042
==21183== at 0x4C222D4: operator new[](unsigned long) (vg_replace_malloc.c:264)
==21183== by 0x5476AC6: URANIE::Launcher::TLauncherFunction::run(TString, TString, char const*) (TLauncherFunction.cxx:259)
==21183== by 0x4E3EB36: URANIE::XMLProblem::TXMLProblem::parseAndRunNodeLauncher(TXMLNode*) (TXMLProblem.cxx:503)
==21183== by 0x4E3BB83: URANIE::XMLProblem::TXMLProblem::parseFile(TString) (TXMLProblem.cxx:140)
==21183== by 0x4E3B548: URANIE::XMLProblem::TXMLProblem::TXMLProblem(TString, bool) (TXMLProblem.cxx:96)
==21183== by 0x408B09: TXMLProblemTest::testXMLfile() (TestTXMLProblem.cxx:76)
==21183== by 0x40884D: CppUnit::TestCaller::runTest() (TestCaller.h:166)
==21183== by 0x610F989: CppUnit::TestCaseMethodFunctor::operator()() const (TestCase.cpp:32)
==21183== by 0x6102E73: CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (DefaultProtector.cpp:15)
==21183== by 0x610BFA9: CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (ProtectorChain.cpp:77)
==21183== by 0x61168D3: CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (TestResult.cpp:178)
==21183== by 0x610F727: CppUnit::TestCase::run(CppUnit::TestResult*) (TestCase.cpp:92)
==21183==
==21183== 36 bytes in 1 blocks are definitely lost in loss record 1,733 of 5,042
==21183== at 0x4C21E43: malloc (vg_replace_malloc.c:195)
==21183== by 0xFE75DF3: ???
==21183== by 0xFE75F97: ???
==21183== by 0xDF006C4: getpwuid_r (in /lib64/libc-2.10.1.so)
==21183== by 0xDEFFF3E: getpwuid (in /lib64/libc-2.10.1.so)
==21183== by 0x7C16BBB: TUnixSystem::UnixHomedirectory(char const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7B79EC2: TROOT::InitSystem() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7B7E48E: TROOT::TROOT(char const*, char const*, void (**)()) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7B7F95B: ROOT::GetROOT() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7B7F9EF: global constructors keyed to TROOT.cxx (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7F6A955: ??? (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7B19A62: ??? (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==
==21183== 48 bytes in 2 blocks are possibly lost in loss record 2,284 of 5,042
==21183== at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183== by 0x7C08124: ROOT::TSchemaRule::ProcessVersion(TString const&) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7C08296: ROOT::TSchemaRule::SetVersion(TString const&) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFDAA5: ROOT::TGenericClassInfo::CreateRuleSet(std::vector<ROOT::TSchemaHelper, std::allocatorROOT::TSchemaHelper >&, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFDE51: ROOT::TGenericClassInfo::GetClass() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0xA5AD697: TTree::Dictionary() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libTree.so.5.32)
==21183== by 0x7B7D795: TROOT::LoadClass(char const*, bool) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BEEF91: TClass::GetClass(char const*, bool, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BD4F95: TBaseClass::GetClassPointer(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE3E50: TClass::GetBaseClass(TClass const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BF2318: TClass::InheritsFrom(TClass const*) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE84F5: TClass::Property() const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==
==21183== 80 bytes in 1 blocks are definitely lost in loss record 2,684 of 5,042
==21183== at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183== by 0x7B81CF9: TStorage::ObjectAlloc(unsigned long) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x409A03: TObject::operator new(unsigned long) (TObject.h:156)
==21183== by 0x54763BF: URANIE::Launcher::TLauncherFunction::run(TString, TString, char const*) (TLauncherFunction.cxx:206)
==21183== by 0x4E3EB36: URANIE::XMLProblem::TXMLProblem::parseAndRunNodeLauncher(TXMLNode*) (TXMLProblem.cxx:503)
==21183== by 0x4E3BB83: URANIE::XMLProblem::TXMLProblem::parseFile(TString) (TXMLProblem.cxx:140)
==21183== by 0x4E3B548: URANIE::XMLProblem::TXMLProblem::TXMLProblem(TString, bool) (TXMLProblem.cxx:96)
==21183== by 0x408B09: TXMLProblemTest::testXMLfile() (TestTXMLProblem.cxx:76)
==21183== by 0x40884D: CppUnit::TestCaller::runTest() (TestCaller.h:166)
==21183== by 0x610F989: CppUnit::TestCaseMethodFunctor::operator()() const (TestCase.cpp:32)
==21183== by 0x6102E73: CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (DefaultProtector.cpp:15)
==21183== by 0x610BFA9: CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (ProtectorChain.cpp:77)
==21183==
==21183== 104 bytes in 2 blocks are possibly lost in loss record 3,004 of 5,042
==21183== at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183== by 0x7B81CF9: TStorage::ObjectAlloc(unsigned long) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7C07E97: ROOT::TSchemaRule::SetTarget(TString const&) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFD9E0: ROOT::TGenericClassInfo::CreateRuleSet(std::vector<ROOT::TSchemaHelper, std::allocatorROOT::TSchemaHelper >&, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFDE51: ROOT::TGenericClassInfo::GetClass() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0xA5AD697: TTree::Dictionary() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libTree.so.5.32)
==21183== by 0x7B7D795: TROOT::LoadClass(char const*, bool) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BEEF91: TClass::GetClass(char const*, bool, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BD4F95: TBaseClass::GetClassPointer(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE3E50: TClass::GetBaseClass(TClass const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BF2318: TClass::InheritsFrom(TClass const*) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE84F5: TClass::Property() const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==
==21183== 144 bytes in 4 blocks are possibly lost in loss record 3,216 of 5,042
==21183== at 0x4C222D4: operator new[](unsigned long) (vg_replace_malloc.c:264)
==21183== by 0x7B832A3: TString::Init(int, int) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7B85779: TString::operator=(TString const&) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7C07E14: ROOT::TSchemaRule::SetTarget(TString const&) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFD9E0: ROOT::TGenericClassInfo::CreateRuleSet(std::vector<ROOT::TSchemaHelper, std::allocatorROOT::TSchemaHelper >&, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFDE51: ROOT::TGenericClassInfo::GetClass() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0xA5AD697: TTree::Dictionary() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libTree.so.5.32)
==21183== by 0x7B7D795: TROOT::LoadClass(char const*, bool) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BEEF91: TClass::GetClass(char const*, bool, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BD4F95: TBaseClass::GetClassPointer(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE3E50: TClass::GetBaseClass(TClass const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BF2318: TClass::InheritsFrom(TClass const*) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==
==21183== 192 bytes in 3 blocks are possibly lost in loss record 3,472 of 5,042
==21183== at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183== by 0x7B81CF9: TStorage::ObjectAlloc(unsigned long) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7C0D110: ROOT::TSchemaRuleSet::TSchemaRuleSet() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE438C: TClass::GetSchemaRules(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFD857: ROOT::TGenericClassInfo::CreateRuleSet(std::vector<ROOT::TSchemaHelper, std::allocatorROOT::TSchemaHelper >&, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFDE51: ROOT::TGenericClassInfo::GetClass() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0xA5AD697: TTree::Dictionary() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libTree.so.5.32)
==21183== by 0x7B7D795: TROOT::LoadClass(char const*, bool) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BEEF91: TClass::GetClass(char const*, bool, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BD4F95: TBaseClass::GetClassPointer(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE3E50: TClass::GetBaseClass(TClass const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BF2318: TClass::InheritsFrom(TClass const*) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==
==21183== 256 bytes in 8 blocks are possibly lost in loss record 3,774 of 5,042
==21183== at 0x4C222D4: operator new[](unsigned long) (vg_replace_malloc.c:264)
==21183== by 0x7B85CA8: TString::Replace(int, int, char const*, int) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7B5DDDC: TNamed::SetName(char const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BD51FB: TBaseClass::TBaseClass(void*, TClass*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BDBC60: TCint::CreateListOfBaseClasses(TClass*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE3AE3: TClass::GetListOfBases() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE3E04: TClass::GetBaseClass(TClass const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BF2318: TClass::InheritsFrom(TClass const*) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE84F5: TClass::Property() const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE33F8: TClass::IsForeign() const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BEC26A: TClass::PostLoadCheck() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7B7D7C0: TROOT::LoadClass(char const*, bool) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==
==21183== 640 bytes in 5 blocks are possibly lost in loss record 4,308 of 5,042
==21183== at 0x4C222D4: operator new[](unsigned long) (vg_replace_malloc.c:264)
==21183== by 0x7B81A15: TStorage::Alloc(unsigned long) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BCD1AF: TObjArray::Init(int, int) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BCDC41: TObjArray::TObjArray(int, int) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7C0D122: ROOT::TSchemaRuleSet::TSchemaRuleSet() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE438C: TClass::GetSchemaRules(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFD857: ROOT::TGenericClassInfo::CreateRuleSet(std::vector<ROOT::TSchemaHelper, std::allocatorROOT::TSchemaHelper >&, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFDE51: ROOT::TGenericClassInfo::GetClass() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0xA5AD697: TTree::Dictionary() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libTree.so.5.32)
==21183== by 0x7B7D795: TROOT::LoadClass(char const*, bool) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BEEF91: TClass::GetClass(char const*, bool, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BD4F95: TBaseClass::GetClassPointer(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==
==21183== 712 bytes in 4 blocks are possibly lost in loss record 4,397 of 5,042
==21183== at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183== by 0x7B81CF9: TStorage::ObjectAlloc(unsigned long) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFD9BD: ROOT::TGenericClassInfo::CreateRuleSet(std::vector<ROOT::TSchemaHelper, std::allocatorROOT::TSchemaHelper >&, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BFDE51: ROOT::TGenericClassInfo::GetClass() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0xA5AD697: TTree::Dictionary() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libTree.so.5.32)
==21183== by 0x7B7D795: TROOT::LoadClass(char const*, bool) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BEEF91: TClass::GetClass(char const*, bool, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BD4F95: TBaseClass::GetClassPointer(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE3E50: TClass::GetBaseClass(TClass const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BF2318: TClass::InheritsFrom(TClass const*) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE84F5: TClass::Property() const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x7BE33F8: TClass::IsForeign() const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==
==21183== 4,000 bytes in 1 blocks are definitely lost in loss record 4,859 of 5,042
==21183== at 0x4C222D4: operator new[](unsigned long) (vg_replace_malloc.c:264)
==21183== by 0x579899A: URANIE::Sampler::TSampling::generateSample(char const*) (in /data/tmpletr/uranietm/v3_2_2_SPO/build/MV2010-64/meTIER/sampler/souRCE/libUranieSampler.so.3.2.2)
==21183== by 0x4E3DC96: URANIE::XMLProblem::TXMLProblem::parseAndRunNodeSampler(TXMLNode*) (TXMLProblem.cxx:416)
==21183== by 0x4E3BB4C: URANIE::XMLProblem::TXMLProblem::parseFile(TString) (TXMLProblem.cxx:136)
==21183== by 0x4E3B548: URANIE::XMLProblem::TXMLProblem::TXMLProblem(TString, bool) (TXMLProblem.cxx:96)
==21183== by 0x408B09: TXMLProblemTest::testXMLfile() (TestTXMLProblem.cxx:76)
==21183== by 0x40884D: CppUnit::TestCaller::runTest() (TestCaller.h:166)
==21183== by 0x610F989: CppUnit::TestCaseMethodFunctor::operator()() const (TestCase.cpp:32)
==21183== by 0x6102E73: CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (DefaultProtector.cpp:15)
==21183== by 0x610BFA9: CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (ProtectorChain.cpp:77)
==21183== by 0x61168D3: CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (TestResult.cpp:178)
==21183== by 0x610F727: CppUnit::TestCase::run(CppUnit::TestResult*) (TestCase.cpp:92)
==21183==
==21183== 10,792 (1,976 direct, 8,816 indirect) bytes in 11 blocks are definitely lost in loss record 4,962 of 5,042
==21183== at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183== by 0x7B81CF9: TStorage::ObjectAlloc(unsigned long) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x409A03: TObject::operator new(unsigned long) (TObject.h:156)
==21183== by 0x5476C7D: URANIE::Launcher::TLauncherFunction::run(TString, TString, char const*) (TLauncherFunction.cxx:271)
==21183== by 0x4E3EB36: URANIE::XMLProblem::TXMLProblem::parseAndRunNodeLauncher(TXMLNode*) (TXMLProblem.cxx:503)
==21183== by 0x4E3BB83: URANIE::XMLProblem::TXMLProblem::parseFile(TString) (TXMLProblem.cxx:140)
==21183== by 0x4E3B548: URANIE::XMLProblem::TXMLProblem::TXMLProblem(TString, bool) (TXMLProblem.cxx:96)
==21183== by 0x408B09: TXMLProblemTest::testXMLfile() (TestTXMLProblem.cxx:76)
==21183== by 0x40884D: CppUnit::TestCaller::runTest() (TestCaller.h:166)
==21183== by 0x610F989: CppUnit::TestCaseMethodFunctor::operator()() const (TestCase.cpp:32)
==21183== by 0x6102E73: CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (DefaultProtector.cpp:15)
==21183== by 0x610BFA9: CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (ProtectorChain.cpp:77)
==21183==
==21183== 28,714 (128 direct, 28,586 indirect) bytes in 1 blocks are definitely lost in loss record 5,006 of 5,042
==21183== at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183== by 0x406FAD: main (TestMain.cxx:82)
==21183==
==21183== 192,944 (6,048 direct, 186,896 indirect) bytes in 22 blocks are definitely lost in loss record 5,040 of 5,042
==21183== at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183== by 0x7B81CF9: TStorage::ObjectAlloc(unsigned long) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183== by 0x409A03: TObject::operator new(unsigned long) (TObject.h:156)
==21183== by 0x4E3B4F1: URANIE::XMLProblem::TXMLProblem::TXMLProblem(TString, bool) (TXMLProblem.cxx:95)
==21183== by 0x408B09: TXMLProblemTest::testXMLfile() (TestTXMLProblem.cxx:76)
==21183== by 0x40884D: CppUnit::TestCaller::runTest() (TestCaller.h:166)
==21183== by 0x610F989: CppUnit::TestCaseMethodFunctor::operator()() const (TestCase.cpp:32)
==21183== by 0x6102E73: CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (DefaultProtector.cpp:15)
==21183== by 0x610BFA9: CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (ProtectorChain.cpp:77)
==21183== by 0x61168D3: CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (TestResult.cpp:178)
==21183== by 0x610F727: CppUnit::TestCase::run(CppUnit::TestResult*) (TestCase.cpp:92)
==21183== by 0x610FE62: CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (TestComposite.cpp:64)
==21183==
==21183== LEAK SUMMARY:
==21183== definitely lost: 12,284 bytes in 39 blocks
==21183== indirectly lost: 224,298 bytes in 1,254 blocks
==21183== possibly lost: 2,112 bytes in 30 blocks
==21183== still reachable: 4,075,462 bytes in 49,785 blocks
==21183== suppressed: 1,479,706 bytes in 16,979 blocks
==21183== Reachable blocks (those to which a pointer was found) are not shown.
==21183== To see them, rerun with: --leak-check=full --show-reachable=yes
==21183==
==21183== For counts of detected and suppressed errors, rerun with: -v
==21183== ERROR SUMMARY: 15 errors from 15 contexts (suppressed: 16 from 16)
[/code]

Some errors involve Uranie and I will have to correct them. But what I do not understand is that I can find some blocks that only depend on Root. For example the first block does not involve Uranie sources:

==21183== 16 bytes in 2 blocks are possibly lost in loss record 1,055 of 5,042
==21183==    at 0x4C2265C: operator new(unsigned long) (vg_replace_malloc.c:220)
==21183==    by 0x7B6804A: std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, std::pair<int, int> const&) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==    by 0x7C08068: ROOT::TSchemaRule::ProcessVersion(TString const&) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==    by 0x7C08296: ROOT::TSchemaRule::SetVersion(TString const&) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==    by 0x7BFDAA5: ROOT::TGenericClassInfo::CreateRuleSet(std::vector<ROOT::TSchemaHelper, std::allocator<ROOT::TSchemaHelper> >&, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==    by 0x7BFDE51: ROOT::TGenericClassInfo::GetClass() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==    by 0xA5AD697: TTree::Dictionary() (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libTree.so.5.32)
==21183==    by 0x7B7D795: TROOT::LoadClass(char const*, bool) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==    by 0x7BEEF91: TClass::GetClass(char const*, bool, bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==    by 0x7BD4F95: TBaseClass::GetClassPointer(bool) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==    by 0x7BE3E50: TClass::GetBaseClass(TClass const*) (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)
==21183==    by 0x7BF2318: TClass::InheritsFrom(TClass const*) const (in /home/uranie/tools/mdriva642010/root5.32.01/ROOT/lib/libCore.so.5.32)

Moreover, the “suppression file”, /home/uranie/ura@nie/toOLS/valgrind-root.supp, is the last version of this file, as it can be found in the Root archive. So I hope it is up-to-date.

Can anyone help me please?
1- Do you believe these leaks are really caused by Root, or could it be a Uranie origin not printed?
2- Is it possible these leaks are not taken into account by the valgrind-root.supp file?
3- What do I have to do to make them disappear: wait for a new version of valgrind-root.supp (in case it is needed), update this file be myself, or create my own new file?

Thank you for helping,

Simon

Dear Rooters,

I worked these last few months in reducing the valgrind errors on Uranie. As I suggested in my last post, I created a valgrind “suppression file” to make the ROOT memory leaks disappear. You will find this file attached.

Would it be possible for anyone to validate this file? In other words, could anyone check that what we think are memory leaks are real memory leaks, and that these are known?

Thanks,
Simon
valgrind-uranie-root.supp.txt (17.3 KB)