Skip to content

Add array index protection to avoid stack overflows

Suppresses address sanitizer errors

==2093==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f945ef91b90 at pc 0x7f9467de7b52 bp 0x7f945ef84530 sp 0x7f945ef84528
READ of size 1 at 0x7f945ef91b90 thread T9
    #0 0x7f9467de7b51 in VSPClus::operator()(LHCb::RawEvent const&) const /workspace/build/REC/REC_HEAD/Pr/PrPixel/src/VSPClus.cpp:524

This MR just adds protection to prevent array index overflows. Experts should investigate if there is a flaw in the algorithm that is leading to the issue in the first place.

FYI @sponce @rquaglia @ahennequ

Edited by Christopher Rob Jones

Merge request reports