-
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
Fix static warnings on DT L1T #43544
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43544/38130
|
A new Pull Request was created by @jfernan2 for master. It involves the following packages:
@cmsbuild, @epalencia, @aloeliger, @srimanob can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
Please test |
The static analyzer report https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e133a0/36189/llvm-analysis/ contains a suggestion for what to do for that warning
|
About the "Branch condition evaluates to a garbage value" warnings, the links from the static analyzer report show the exact branch decisions the analyzer did to come to its conclusion. Here is the one about I think the warning in this case is about the case where Note that variable length arrays (VLA, |
Thanks @makortel |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43544/38134
|
Pull request #43544 was updated. @aloeliger, @cmsbuild, @srimanob, @epalencia can you please check and sign again. |
Please test |
-1 Failed Tests: RelVals RelVals-INPUT RelVals
RelVals-INPUT |
Please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-899d3e/36426/summary.html Comparison SummarySummary:
|
+Upgrade The warnings on |
+l1 |
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. @rappoccio, @antoniovilela, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR fixes some static warnings in DT L1T emulator detected during integration of AMv2 in #43390
Out of the 8 warnings (see below), only the first 2 have been fixed by this PR.
Those related to core.uninitialized.Branch look false positives as far as I can see, since the vectors pointed out have been initialized previously at the beginning on purpouse to false in https://github.com/cms-sw/cmssw/blob/master/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc#L123-L127
The last one claims a nonFinite computation but this is exactly what is being tried to avoid.
I am not sure if the code experts like @makortel have any advice on how to proceed. Thanks in advance.
Static Warnings:
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2023-11-29-2300/src/L1Trigger/DTTriggerPhase2/src/GlobalCoordsObtainer.cc:222:3: warning: Value stored to 'x_msb' is never read [deadcode.DeadStores]
222 | x_msb = from_two_comp(x_msb, PHI_LUT_ADDR_WIDTH);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2023-11-29-2300/src/L1Trigger/DTTriggerPhase2/src/GlobalCoordsObtainer.cc:225:3: warning: Value stored to 'tanpsi_msb' is never read [deadcode.DeadStores]
225 | tanpsi_msb = from_two_comp(tanpsi_msb, PHIB_LUT_ADDR_WIDTH);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2023-11-29-2300/src/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc:592:15: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
592 | if (useFitSL3[sl3])
| ^~~~~~~~~~~~~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2023-11-29-2300/src/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc:844:19: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
844 | if (useFitSL1[sl1])
| ^~~~~~~~~~~~~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2023-11-29-2300/src/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc:905:19: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
905 | if (useFitSL3[sl3])
| ^~~~~~~~~~~~~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2023-11-29-2300/src/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc:1011:9: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
1011 | if (!useFit[i])
| ^~~~~~~~~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2023-11-29-2300/src/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc:1016:11: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
1016 | if (!useFit[j])
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2023-11-29-2300/src/L1Trigger/DTTriggerPhase2/src/MuonPathAnalyzerInChamber.cc:245:9: warning: cms.NonFiniteMath [cms.NonFiniteMath]
245 | if (isnan(jm_x))
| ^
1 warning generated.