-
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
Static analyzer report shrunk with LLVM update #41828
Comments
assign core |
New categories assigned: core @Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks |
A new Issue was created by @makortel Matti Kortelainen. @Dr15Jones, @perrotta, @dpiparo, @rappoccio, @makortel, @smuzaffar can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
@gartung This is what we briefly talked about. |
The biggest decrease is for the mutable member checker. I will start there. |
It looks like LLVM is removing duplicate reports. The post processing script does this for older versions of llvm/clang. Comparing the filtered pages the number of mutable member entries is 450 for CMSSW_13_0_X and 355 for CMSSW_13_2_X. So the difference is orders of magnitude smaller compared to the unfiltered count of 23534 for CMSSW_13_0_X and 368 for CMSSW_13_2_X. The filtered vs unfiltered for CMSSW_13_2_X is only 368 vs 355. |
@makortel I can dig deeper into the 450 vs 355 difference if you think it is worth the effort. |
The unfiltered scan-build report has multiple entries per file which account for some difference with the filtered scan-build report. The unfiltered report is again sortable. The filtered report being unresponsive to sorting was reported previously in #37982 |
Could you check some other bug category as well if the same happens there? (probably does)
I think one step deeper inspection could be useful. A difference of hundred feels large (although if genuine, very welcome!) |
These two are no longer tagged cmssw/Utilities/StorageFactory/bin/anycp.cpp Line 177 in 43a0885
|
Ok, that makes sense. |
Could you check the cause of the differences of
as an additional examples? Are they all caused by the reduction of duplicates, or is there some example case that doesn't get reported anymore? I think (well, hope) if these would be a sufficient set of checks such that if nothing suspicious comes up, we can continue with the new report and close the issue. |
The change happened with the change to llvm/clang 14 |
These two variables of the same name but different class are tagged. cmssw/Utilities/StorageFactory/bin/anycp.cpp Line 111 in 43a0885
|
Was the link correct? |
Yes |
I looked at the output of the FunctionDumper for the three versions of clang, 12, 14, and 16. The correct number of mutables are reported for anycp.cpp in all three cases. I will have to check what I did differently for mutables in FunctionDumper |
Correction, the output files for ConstCastChecker, ConstCastAwayChecker and MutableMemberChecker are all sorted unique to produce const-checker.txt. The difference between clang 12 and clang 16 is
This is easily explained by changes in 132x relative to 130x. |
The difference must be in how BugReporter is handling multiple reports of the same variable name from different classes in the same compilation unit. |
For "Dead nested assignment" the difference in unique reports between clang 12 - 130X and clang 16 - 132x is attributable to changes in the code
|
These flagged cases all look suspicious (i.e. good to be flagged). But do I understand correctly that they are flagged in llvm16 but not in llvm12? (i.e. would not explain the cases reported in 12 but not in 16) |
Yes. I am still trying to determine why some bug reports are missing. The text output is written to file bypassing the BugReporter. |
I have a possible solution, art least for the missing reports for mutable members with the same name in different classes. There may be other cases. |
+core I think this has been addressed |
cms-bot internal usage |
This issue is fully signed and ready to be closed. |
The static analyzer reports in 13_0_X about 39k issues (https://cmssdt.cern.ch/SDT/jenkins-artifacts/ib-static-analysis/CMSSW_13_0_X_2023-05-30-2300/el8_amd64_gcc11/llvm-analysis/index.html), whereas in 13_2_X it reports only about 4k issues (https://cmssdt.cern.ch/SDT/jenkins-artifacts/ib-static-analysis/CMSSW_13_2_X_2023-05-30-2300/el8_amd64_gcc11/llvm-analysis/index.html). In 13_0_X we had LLVM 12, and in 13_2_X LLVM 16. Likely something in the static analyzer got borken with the LLVM update.
The text was updated successfully, but these errors were encountered: