Compiling errors

I would like to congratulate you for root 6, it is phenomenal :smiley:
However, I ran the clang++ static analyser
–analyze -Xanalyzer

and I found many issues (they can cause bugs).

the log file is called clang.log, it is in my public folder alhroob/public.

I hope it is helpful.



thanks for trying out ROOT6 and for scrutinising it with the Clang static analyser: it is certainly useful!

I think clang static analysis is an extremely promising technology, also because of the accessible way offered to write custom static analysis plugins. It can be a good complementary check to the present static checker used routinely for ROOT, Coverity.
I myself carried out several static analyses of root, the last one of which 2 months ago with the trunk of Clang. I was enthusiastic at the results obtained, but still a bit unsatisfied with the rate of false positives :frowning: Did you also produce a web report with scan-build?


I compiled root with two clang options:
–analyze for the static analysis and -Xanalyzer option to get the detailed information about the bug.

I checked some of the outcome and I found them real :frowning:

I also ran
scan-build -o ClangReport -V make -j4
and I found 107 bugs :cry:

the outcome directory is called ClangReport, I put it in my public folder at lxplus


would would be the directory?
/afs/ is not the correct one.


my cern user name is alhroob



I was browsing your report. Interesting!
It is useful to note that:

  1. The majority of warnings come from code ROOT provides but does not maintain (Asimage, lzma etc.)
  2. None seems potentially fatal or able to corrupt results

Said that, the dead assignments are there. Luckily the compiler with some decent optimisation flag gets rid of them easily.
I think it’s a pity that the analyser dies in many occasions (Analyzer Failures).