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 undefined behavior in TSGFromL2 from empty pointer #35452

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions RecoMuon/TrackerSeedGenerator/plugins/TSGFromL2Muon.cc
Expand Up @@ -90,6 +90,8 @@ void TSGFromL2Muon::produce(edm::Event& ev, const edm::EventSetup& es) {
std::unique_ptr<RectangularEtaPhiTrackingRegion> region;
if (theRegionBuilder) {
region = theRegionBuilder->region(muRef);
} else {
region = std::make_unique<RectangularEtaPhiTrackingRegion>();
}

//Make seeds container
Expand Down
Expand Up @@ -42,6 +42,8 @@ class RectangularEtaPhiTrackingRegion final : public TrackingRegion {

static UseMeasurementTracker stringToUseMeasurementTracker(const std::string& name);

RectangularEtaPhiTrackingRegion() {}

RectangularEtaPhiTrackingRegion(RectangularEtaPhiTrackingRegion const& rh)
: TrackingRegion(rh),
theEtaRange(rh.theEtaRange),
Expand Down
2 changes: 2 additions & 0 deletions RecoTracker/TkTrackingRegions/interface/TrackingRegion.h
Expand Up @@ -47,6 +47,8 @@ class TrackingRegion {
typedef SeedingLayerSetsHits::Hits Hits;

public:
TrackingRegion() {}

TrackingRegion(const GlobalVector& direction,
const GlobalPoint& originPos,
const Range& invPtRange,
Expand Down