Clang static analyzer

Tiago Vignatti vignatti at freedesktop.org
Mon Dec 7 16:52:20 PST 2009


Tomas Carnecky wrote:
> On Dec 7, 2009, at 10:32 PM, Brian Paul wrote:
> 
>> Tomas Carnecky wrote:
>>> During the past two days I played with the clang static analyzer. Clang is a C/C++ compiler based on LLVM. The clang static analyzer makes use of clang and the LLVM infrastructure to perform static analysis on C source code. I wrote a blog post [1] about my experience with it so far.
>>> I tested the static analyzer on a few opensource projects, one of which was the xorg xserver. The results (333 potential bugs) are available on my web server [2]. I skimmed only quickly over the results and they need careful review to find out which ones are actual bugs. Some of the issues are very easy to review (dead assignments, dead increments), others not so much.
>>> I could run the analyzer on other parts of the xorg stack (mesa, drivers, libraries) if there is interest.
>> I'd be interested in the results for Mesa.
> 
> Sure, I've just set up the infrastructure to run the clang analyzer on all modules listed in util/modular/plain/xorg.modules. Are there any additional configure or make flags you want me to use when building mesa? Right now the scripts are set up to run the standard ./configure && make, but I can add per-module flags or options. 
> 

Would be nice to set up this frequently and post the results on X wiki.

If you are able to do so, then someone should set up an account for you 
at annarchy.fd.o (better poke someone and raise up this on #xorg-devel).


           Tiago


More information about the xorg-devel mailing list