Fix OOB access in case the ROF bin has no tracks#15345
Fix OOB access in case the ROF bin has no tracks#15345ktf wants to merge 1 commit intoAliceO2Group:devfrom
Conversation
| for (int is = 0; is < 3; is++) { | ||
| nextDynOffs = FlatObject::alignSize(nextDynOffs, SplineType::getParameterAlignmentBytes()); | ||
| nextDynOffs += origCorr.mSectorDataSizeBytes[is] * TPCFastTransformGeo::getNumberOfSectors(); | ||
| nextDynOffs += FlatObject::alignSize(origCorr.mSectorDataSizeBytes[is], SplineType::getParameterAlignmentBytes()) * TPCFastTransformGeo::getNumberOfSectors(); |
There was a problem hiding this comment.
Are you sure this is needed?
TPCFastSpaceChargeCorrection::FinishConstruction ends with
mSectorDataSizeBytes[is] = alignSize(mSectorDataSizeBytes[is], SplineType::getParameterAlignmentBytes());
So this should already be aligned correctly. Did you check that it happens that this size comes in as not a multiple of the alignment? If yes, I'd check why that happens instead of changing it here.
Actually, do we have a way to reproduce it and fix it properly? And I am also a bit puzzled why this triggers an alignment issue on ARM, but I do not see anything in the sanitizers on x86. Alignment requirements on the language level should be the same.
|
After a little bit more debugging, it looks like for some reason we have: in doMatching. This is the new tentative fix. @davidrohr @shahor02 |
|
|
Yes. I have updated the PR with some extra debug information. |
No description provided.