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
Protect against bad inputs in EnergyUncertaintyElectronSpecific #26241
Protect against bad inputs in EnergyUncertaintyElectronSpecific #26241
Conversation
ASAN reported out of bounds reads in calls to member functions. We now report if an input value would result in bad array reads. In addition, moved the arrays from the stack to a compile time created memory location.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26241/8888
|
A new Pull Request was created by @Dr15Jones (Chris Jones) for master. It involves the following packages: RecoEgamma/EgammaElectronAlgos @cmsbuild, @perrotta, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
0.0111448, | ||
0.0146648}}; | ||
|
||
static_assert(par0[0][0] == 0.00567891f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan to keep these asserts? (I imagine that they were there just to verify that numbers where migrated correctly...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are compile time checks so they have no effect at run time. I'm fine with keeping or with removing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only complain is aesthetic, at this point (therefore, not really relevant).
I pointed it out to you, and I'll let you decide. (I'd personally remove them, though)
-25.2897}}; | ||
|
||
|
||
static_assert(par0[0][3]==0.00596201f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here...
+1
|
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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
ping bot? |
resolves #26238 |
PR description:
ASAN reported out of bounds reads in calls to member functions. We now report if an input value would result in bad array reads.
In addition, moved the arrays from the stack to a compile time created memory location.
PR validation:
Compiles locally. Converted old array assignments into static_assert to check that array order was properly preserved. Obtained array values mechanically via command line pipes of
grep
,awk
,head
andtail
.