-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Fixing crash when accessing JetResolutionObject in CondDB #42199
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42199/36205
|
A new Pull Request was created by @yuanchao (Yuan CHAO) for master. It involves the following packages:
@perrotta, @consuegs, @cmsbuild, @saumyaphor4252, @francescobrivio, @tvami can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
reco::FormulaEvaluator* Formula = new reco::FormulaEvaluator(m_definition.getFormulaString()); | ||
if (!Formula) | ||
return 1; | ||
auto formula = *Formula; |
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.
This is a memory leak. Better to do
reco::FormulaEvaluator formula{m_definition.getFormulaString()};
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42199/36224
|
Pull request #42199 was updated. @perrotta, @consuegs, @cmsbuild, @saumyaphor4252, @francescobrivio, @tvami can you please check and sign again. |
@cmsbuild , please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-29afda/33601/summary.html Comparison SummaryThere are some workflows for which there are errors in the baseline: Summary:
|
+db
|
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, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
For the crashes found while accessing the JetResolutionObject in CondDB, it's found that the bins and variables are empty with Definiton::getBins() and Definition::getVariables(). This causes segmentation violation when calling JetResolutionObject::getRecord(). As not seen in XML dump, the formula is obtained through the formula string. Later found that Definition::nBins() is actually check from the bin-name strings. This PR changes Definition::nVariables() accordingly. Also make new function overloading on createVector to access through name strings. Minimum changes to get around the crashes.
PR validation:
Tested locally with getPayLoadData.py on modified PI to make sure no seg. fault. Python binding parts are not touched.
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
Not a backport and no backport is expected.