Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ASAN Segmentation failure & heap-buffer-overflow in unit test Alignment/OfflineValidation/GCPall #41080

Merged
merged 1 commit into from
Mar 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Alignment/OfflineValidation/plugins/TrackerGeometryCompare.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TrackerGeometryCompare::TrackerGeometryCompare(const edm::ParameterSet& cfg)
fromDD4hep_(cfg.getUntrackedParameter<bool>("fromDD4hep")),
writeToDB_(cfg.getUntrackedParameter<bool>("writeToDB")),
commonTrackerLevel_(align::invalid),
moduleListFile_(nullptr),
moduleListFile_(),
moduleList_(0),
inputRootFile1_(nullptr),
inputRootFile2_(nullptr),
Expand Down Expand Up @@ -337,8 +337,9 @@ void TrackerGeometryCompare::createROOTGeometry(const edm::EventSetup& iSetup) {
AlignTransform transform1(translation1, eulerangles1, detid1);
alignments1->m_align.push_back(transform1);

//dummy errors
CLHEP::HepSymMatrix clhepSymMatrix(3, 0);
// dummy errors
// APE matrix was 3x3, now it's 6x6 (because of muons), see PR #6483
CLHEP::HepSymMatrix clhepSymMatrix(6, 0);
AlignTransformErrorExtended transformError(clhepSymMatrix, detid1);
alignmentErrors1->m_alignError.push_back(transformError);
}
Expand Down Expand Up @@ -371,8 +372,9 @@ void TrackerGeometryCompare::createROOTGeometry(const edm::EventSetup& iSetup) {
AlignTransform transform2(translation2, eulerangles2, detid2);
alignments2->m_align.push_back(transform2);

//dummy errors
CLHEP::HepSymMatrix clhepSymMatrix(3, 0);
// dummy errors
// APE matrix was 3x3, now it's 6x6 (because of muons), see PR #6483
CLHEP::HepSymMatrix clhepSymMatrix(6, 0);
AlignTransformErrorExtended transformError(clhepSymMatrix, detid2);
alignmentErrors2->m_alignError.push_back(transformError);
}
Expand Down