Skip to content

Commit

Permalink
Merge pull request #3 from folguera/smuzaffar_ubsan-l1-emptry-array
Browse files Browse the repository at this point in the history
Also fix UBSAN error on L989
  • Loading branch information
smuzaffar authored May 31, 2023
2 parents 1334546 + d6cb7fc commit 5393094
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> dtdigis,
bool at_least_one_SL1_confirmation = false;
bool at_least_one_SL3_confirmation = false;

bool useFitSL1[SL1metaPrimitives.size()];
vector<bool> useFitSL1;
for (unsigned int i = 0; i < SL1metaPrimitives.size(); i++)
useFitSL1[i] = false;
bool useFitSL3[SL3metaPrimitives.size()];
useFitSL1.push_back(false);
vector<bool> useFitSL3;
for (unsigned int i = 0; i < SL3metaPrimitives.size(); i++)
useFitSL3[i] = false;
useFitSL3.push_back(false);

//SL1-SL3
vector<metaPrimitive> chamberMetaPrimitives;
Expand Down Expand Up @@ -986,9 +986,9 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> dtdigis,
}

void MuonPathAssociator::removeSharingFits(vector<metaPrimitive> &chamberMPaths, vector<metaPrimitive> &allMPaths) {
bool useFit[chamberMPaths.size()];
vector<bool> useFit;
for (unsigned int i = 0; i < chamberMPaths.size(); i++) {
useFit[i] = true;
useFit.push_back(true);
}
for (unsigned int i = 0; i < chamberMPaths.size(); i++) {
if (debug_)
Expand Down

0 comments on commit 5393094

Please sign in to comment.