Memory leaks in TMVATransform / ROOT TMVA
https://lhcb-nightlies.web.cern.ch/nightly/lhcb-sanitizers/996/Moore/x86_64_v2-centos7-gcc11-dbg%2Blsan/build shows some leaks in TMVATransform / ROOT TMVA . The first (out of many) stack is
Indirect leak of 10194688 byte(s) in 91024 object(s) allocated from:
#0 0x7f8e5989c494 in operator new(unsigned long) /build/dkonst/gcc-clang-2/build/contrib/gcc-11.1.0/src/gcc/11.1.0/libsanitizer/lsan/lsan_interceptors.cpp:238
#1 0x7f8e054c05e8 in TMVA::DecisionTreeNode::CreateNode() const /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/inc/TMVA/DecisionTreeNode.h:132
#2 0x7f8e0568b63d in TMVA::Node::ReadXML(void*, unsigned int) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/Node.cxx:176
#3 0x7f8e0568b65a in TMVA::Node::ReadXML(void*, unsigned int) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/Node.cxx:177
#4 0x7f8e0568b65a in TMVA::Node::ReadXML(void*, unsigned int) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/Node.cxx:177
#5 0x7f8e0568b65a in TMVA::Node::ReadXML(void*, unsigned int) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/Node.cxx:177
#6 0x7f8e0568b65a in TMVA::Node::ReadXML(void*, unsigned int) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/Node.cxx:177
#7 0x7f8e0568b65a in TMVA::Node::ReadXML(void*, unsigned int) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/Node.cxx:177
#8 0x7f8e0568b65a in TMVA::Node::ReadXML(void*, unsigned int) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/Node.cxx:177
#9 0x7f8e054221d5 in TMVA::BinaryTree::ReadXML(void*, unsigned int) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/BinaryTree.cxx:149
#10 0x7f8e054a6f36 in TMVA::DecisionTree::CreateFromXML(void*, unsigned int) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/DecisionTree.cxx:286
#11 0x7f8e05543e88 in TMVA::MethodBDT::ReadWeightsFromXML(void*) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/MethodBDT.cxx:2396
#12 0x7f8e0551e71a in TMVA::MethodBase::ReadStateFromXML(void*) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/MethodBase.cxx:1563
#13 0x7f8e0551d88a in TMVA::MethodBase::ReadStateFromXMLString(char const*) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/MethodBase.cxx:1461
#14 0x7f8e056b59d7 in TMVA::Reader::BookMVA(TMVA::Types::EMVA, char const*) /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.24.06/src/ROOT/6.24.06/tmva/tmva/src/Reader.cxx:453
#15 0x7f8e1d8b4e88 in TMVATransform::readWeightsFile(std::ostream&) ../Phys/MVADictTools/src/lib/TMVATransform.cpp:165
#16 0x7f8e1d8b3def in TMVATransform::Init(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::ostream&, bool) ../Phys/MVADictTools/src/lib/TMVATransform.cpp:36
#17 0x7f8dd9461a7e in LoKi::Hybrid::DictTransform<TMVATransform>::initialize() ../Phys/LoKiArrayFunctors/include/LoKi/DictTransform.h:57
#18 0x7f8e305217d7 in operator() ../GaudiKernel/src/Lib/AlgTool.cpp:168