-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix undefined behavior in TSGFromL2 from empty pointer #35452
Conversation
…kingRegion and use them in TSGFromL2Muon
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35452/25609
|
A new Pull Request was created by @CeliaFernandez (Celia Fernández Madrazo) for master. It involves the following packages:
@jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4d0d74/19206/summary.html Comparison SummarySummary:
|
+reconstruction
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
Fix undefined behavior in
TSGFromL2Muon
, reported in issue 35036. The issue is caused by theregion
pointer, which is only initialized if there is a validtheRegionBuilder
in the event. The region pointer is then accessed empty in lines 102/104 and 106/108 when given as an input totrackerSeeds()
andclean()
functions.To solve this issue, I added a default constructor without parameters for
RectangularEtaPhiTrackingRegion
andTrackingRegion
classes. This makes possible to have a minimal initialization for theregion
pointer. The default initialization ofregion
is done iftheRegionBuilder
states tofalse
by adding anelse
statement in line 93. Then, when the code tries to access it in lines 102/104 and 106/108region
is not an empty pointer anymore.PR validation:
I verified that the undefined behavior error disappears by running the workflow 11650.0 in
CMSSW_12_1_UBSAN_X_2021-09-13-1100
release.The code have a clean build without errors and pass the basic tests (
runTheMatrix.py -l limited -i all --ibeos
) when running withCMSSW_12_1_X_2021-09-23-2300
. I have also checked out the dependencies and the code format.