Skip to content

Commit

Permalink
fix ASAN Segmentation failure & heap-buffer-overflow in unit test Ali…
Browse files Browse the repository at this point in the history
…gnment/OfflineValidation/GCPall
  • Loading branch information
mmusich committed Mar 17, 2023
1 parent 8f18998 commit 920dcdb
Showing 1 changed file with 7 additions and 5 deletions.
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

0 comments on commit 920dcdb

Please sign in to comment.