Skip to content

Suppress some UB sanitizer errors from LbAppInit string hash

Work around for errors like

/workspace/build/LHCB/LHCB_HEAD/Kernel/LHCbKernel/src/LbAppInit.cpp:210:32: runtime error: left shift of 69513675 by 10 places cannot be represented in type 'int'
    #0 0x7f2113a7344f in LbAppInit::getSeeds(unsigned int, unsigned long long) const /workspace/build/LHCB/LHCB_HEAD/Kernel/LHCbKernel/src/LbAppInit.cpp:210
    #1 0x7f210e27c62b in RecInit::operator()(LHCb::ODIN const&, LHCb::RawEvent const&) const /workspace/build/REC/REC_HEAD/Rec/RecAlgs/src/RecInit.cpp:84 
/workspace/build/LHCB/LHCB_HEAD/Kernel/LHCbKernel/src/LbAppInit.cpp:210:23: runtime error: signed integer overflow: 643403938 + 1715636224 cannot be represented in type 'int'
    #0 0x7f2113a73466 in LbAppInit::getSeeds(unsigned int, unsigned long long) const /workspace/build/LHCB/LHCB_HEAD/Kernel/LHCbKernel/src/LbAppInit.cpp:210
    #1 0x7f210e27c62b in RecInit::operator()(LHCb::ODIN const&, LHCb::RawEvent const&) const /workspace/build/REC/REC_HEAD/Rec/RecAlgs/src/RecInit.cpp:84 

Does not fix the code, just flags it as not to be sanitized.

Fixing it properly would need to be done carefully so as not to change the output for a given string (as this could have backwards compatibility issues).

Merge request reports