Skip to content

CheckGeometryOverlaps - Fix memory leak

Addresses sanitiser error

Direct leak of 3690680 byte(s) in 9415 object(s) allocated from:
    #0 0x7f23c2531da8 in operator new(unsigned long) /afs/cern.ch/cms/CAF/CMSCOMM/COMM_ECAL/dkonst/GCC/build/contrib/gcc-8.2.0/src/gcc/8.2.0/libsanitizer/lsan/lsan_interceptors.cc:229
    #1 0x7f239a99b9a0 in std::_MakeUniq<PVolume>::__single_object std::make_unique<PVolume, 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&, ROOT::Math::Impl::Transform3D<double> 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&, ROOT::Math::Impl::Transform3D<double> const&) /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/8.2.0-3fa06/x86_64-centos7/include/c++/8.2.0/bits/unique_ptr.h:831
    #2 0x7f239a99b9a0 in LogVolBase::createPVolume(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&, ROOT::Math::Impl::Transform3D<double> const&) ../Det/DetDesc/src/Lib/LogVolBase.cpp:211
    #3 0x7f2393202915 in XmlLVolumeCnv::internalCreateObj(xercesc_3_1::DOMElement*, DataObject*&, IOpaqueAddress*) ../Det/DetDescCnv/src/component/XmlLVolumeCnv.cpp:394
    #4 0x7f23931b16ec in XmlGenericCnv::createObj(IOpaqueAddress*, DataObject*&) ../Det/DetDescCnv/src/Lib/XmlGenericCnv.cpp:257
    #5 0x7f23a73bec79 in ConversionSvc::makeCall(int, bool, bool, bool, IOpaqueAddress*&, DataObject*&) ../GaudiKernel/src/Lib/ConversionSvc.cpp:46
    #6 0x7f23a73bf3bc in ConversionSvc::createObj(IOpaqueAddress*, DataObject*&) ../GaudiKernel/src/Lib/ConversionSvc.cpp:90
    #7 0x7f23995e32a5 in PersistencySvc::makeCall(int, IOpaqueAddress*&, DataObject*&) ../GaudiCommonSvc/src/PersistencySvc/PersistencySvc.cpp:71
    #8 0x7f23995e370e in PersistencySvc::createObj(IOpaqueAddress*, DataObject*&) ../GaudiCommonSvc/src/PersistencySvc/PersistencySvc.cpp:106
    #9 0x7f23a74fc212 in TsDataSvc::loadObject(IConversionSvc*, IRegistry*) ../GaudiKernel/src/Lib/TsDataSvc.cpp:501
    #10 0x7f239b38cbd8 in DetDataSvc::loadObject(IConversionSvc*, IRegistry*) (/usera/jonesc/LHCbCMake/Feature/Gaudi/InstallArea/x86_64-centos7-gcc8-dbg+lsan/lib/libGaudiSvc.so+0x154bd8)
    #11 0x7f23a74f79e0 in TsDataSvc::loadObject(IRegistry*) ../GaudiKernel/src/Lib/TsDataSvc.cpp:461
    #12 0x7f23a74fb3f6 in TsDataSvc::retrieveEntry(DataSvcHelpers::RegistryEntry*, std::basic_string_view<char, std::char_traits<char> >, DataSvcHelpers::RegistryEntry*&) ../GaudiKernel/src/Lib/TsDataSvc.cpp:597
    #13 0x7f23a74fb104 in TsDataSvc::retrieveEntry(DataSvcHelpers::RegistryEntry*, std::basic_string_view<char, std::char_traits<char> >, DataSvcHelpers::RegistryEntry*&) ../GaudiKernel/src/Lib/TsDataSvc.cpp:575
    #14 0x7f23a74fb104 in TsDataSvc::retrieveEntry(DataSvcHelpers::RegistryEntry*, std::basic_string_view<char, std::char_traits<char> >, DataSvcHelpers::RegistryEntry*&) ../GaudiKernel/src/Lib/TsDataSvc.cpp:575
    #15 0x7f23a74fb104 in TsDataSvc::retrieveEntry(DataSvcHelpers::RegistryEntry*, std::basic_string_view<char, std::char_traits<char> >, DataSvcHelpers::RegistryEntry*&) ../GaudiKernel/src/Lib/TsDataSvc.cpp:575
    #16 0x7f23a74fb104 in TsDataSvc::retrieveEntry(DataSvcHelpers::RegistryEntry*, std::basic_string_view<char, std::char_traits<char> >, DataSvcHelpers::RegistryEntry*&) ../GaudiKernel/src/Lib/TsDataSvc.cpp:575
    #17 0x7f23a74faf6d in TsDataSvc::retrieveEntry(DataSvcHelpers::RegistryEntry*, std::basic_string_view<char, std::char_traits<char> >, DataSvcHelpers::RegistryEntry*&) ../GaudiKernel/src/Lib/TsDataSvc.cpp:551
    #18 0x7f23a74fb550 in TsDataSvc::retrieveObject(IRegistry*, std::basic_string_view<char, std::char_traits<char> >, DataObject*&) ../GaudiKernel/src/Lib/TsDataSvc.cpp:617
    #19 0x7f23a74ee647 in IDataProviderSvc::retrieveObject(std::basic_string_view<char, std::char_traits<char> >, DataObject*&) ../GaudiKernel/GaudiKernel/IDataProviderSvc.h:234
    #20 0x7f23a74ee647 in SmartDataObjectPtr::retrieve(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DataObject*&) ../GaudiKernel/src/Lib/SmartDataObjectPtr.cpp:37
    #21 0x7f23a74ee9d1 in SmartDataObjectPtr::retrieveObject() ../GaudiKernel/src/Lib/SmartDataObjectPtr.cpp:69
    #22 0x7f23a74eec9b in SmartDataObjectPtr::retrieve(SmartDataObjectPtr*) ../GaudiKernel/GaudiKernel/SmartDataObjectPtr.h:89
    #23 0x7f239a9a5b7a in SmartDataObjectPtr::accessData() /usera/jonesc/LHCbCMake/Feature/Gaudi/InstallArea/x86_64-centos7-gcc8-dbg+lsan/include/GaudiKernel/SmartDataObjectPtr.h:86
    #24 0x7f239a9a5b7a in SmartDataStorePtr<ILVolume, SmartDataObjectPtr::ObjectLoader>::accessTypeSafeData() /usera/jonesc/LHCbCMake/Feature/Gaudi/InstallArea/x86_64-centos7-gcc8-dbg+lsan/include/GaudiKernel/SmartDataStorePtr.h:112
    #25 0x7f239a9a5b7a in SmartDataStorePtr<ILVolume, SmartDataObjectPtr::ObjectLoader>::operator int() /usera/jonesc/LHCbCMake/Feature/Gaudi/InstallArea/x86_64-centos7-gcc8-dbg+lsan/include/GaudiKernel/SmartDataStorePtr.h:105
    #26 0x7f239a9a5b7a in PVolume::findLogical() ../Det/DetDesc/src/Lib/PVolume.cpp:78
    #27 0x7f239a9a7e89 in PVolume::PVolume(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&, ROOT::Math::Impl::Transform3D<double> const&) ../Det/DetDesc/src/Lib/PVolume.cpp:65
    #28 0x7f239a99b9b4 in std::_MakeUniq<PVolume>::__single_object std::make_unique<PVolume, 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&, ROOT::Math::Impl::Transform3D<double> 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&, ROOT::Math::Impl::Transform3D<double> const&) /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/8.2.0-3fa06/x86_64-centos7/include/c++/8.2.0/bits/unique_ptr.h:831
    #29 0x7f239a99b9b4 in LogVolBase::createPVolume(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&, ROOT::Math::Impl::Transform3D<double> const&) ../Det/DetDesc/src/Lib/LogVolBase.cpp:211
    #30 0x7f2393202915 in XmlLVolumeCnv::internalCreateObj(xercesc_3_1::DOMElement*, DataObject*&, IOpaqueAddress*) ../Det/DetDescCnv/src/component/XmlLVolumeCnv.cpp:394
    #31 0x7f23931b16ec in XmlGenericCnv::createObj(IOpaqueAddress*, DataObject*&) ../Det/DetDescCnv/src/Lib/XmlGenericCnv.cpp:257
    #32 0x7f23a73bec79 in ConversionSvc::makeCall(int, bool, bool, bool, IOpaqueAddress*&, DataObject*&) ../GaudiKernel/src/Lib/ConversionSvc.cpp:46
    #33 0x7f23a73bf3bc in ConversionSvc::createObj(IOpaqueAddress*, DataObject*&) ../GaudiKernel/src/Lib/ConversionSvc.cpp:90
    #34 0x7f23995e32a5 in PersistencySvc::makeCall(int, IOpaqueAddress*&, DataObject*&) ../GaudiCommonSvc/src/PersistencySvc/PersistencySvc.cpp:71
    #35 0x7f23995e370e in PersistencySvc::createObj(IOpaqueAddress*, DataObject*&) ../GaudiCommonSvc/src/PersistencySvc/PersistencySvc.cpp:106

In additional, whilst there, some minor modernisation updates.

Edited by Marco Cattaneo

Merge request reports

Loading