Skip to content

Fix usage of uninitialized values in the IOVSvc.

Valgrind reported several issues where conditional jumps or moves depend on uninitialised values. For example:

insert_unique<CBNode* const&>(CBNode* const&) (in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-08-11T2129/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/lib/libIOVSvcLib.so)
==31194==    by 0x4C185896: CBNode::addChild(CBNode*) (in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-08-11T2129/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/lib/libIOVSvcLib.so)
==31194==    by 0x4C185BA6: CBNode::CBNode(SG::DataProxy const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, CBNode*) (in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-08-11T2129/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/lib/libIOVSvcLib.so)
==31194==    by 0x4C186EE0: CBTree::addNode(SG::DataProxy const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-08-11T2129/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/lib/libIOVSvcLib.so)
==31194==    by 0x4C1C4820: IOVSvcTool::regProxy(SG::DataProxy const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-08-11T2129/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/lib/libIOVSvcLib.so)
==31194==    by 0x4C1B2F78: IOVSvc::regProxy(SG::DataProxy const*, 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&) (in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-08-11T2129/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/l

This is fixed by the commit "Ensure that node level is set before it is used for sorting."

The commit "Do not add nullptr as parent." does not fix any known issue, but the code will not always correctly handle null pointer in the list of parents.

Merge request reports