gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static analyser results for -base (277 potential bugs)


From: David Chisnall
Subject: Static analyser results for -base (277 potential bugs)
Date: Thu, 9 Sep 2010 18:34:21 +0100

Hi Everyone,

Thanks to Nicola's latest tweak to -make, it's now possible to use the clang 
static analyser with GNUstep Make apps.

The static analyser front end thingy is not installed by default with clang, so 
if you want to do this you will need to run it from its location in the source 
tree, something like this:

$ ~/llvm/tools/clang/tools/scabuild/scan-build -k gmake

This will generate a directory in /tmp (you can control the output location 
with -o) containing the analysis results.  Note that some of the things the 
analyser does are O(n^2), so it can take a very long time to run.  It took me 
about 15 minutes to run for -base, generating 73MB of HTML in the process.  You 
can find the results here:

http://theravensnest.org/gsbase/

At some point, I'll set up a nightly cron job on that machine to automatically 
run it on GNUstep and Étoilé.  

For now, the report on -base should give people something to do.  It found 277 
bugs.  Quite a few of these are instances of the same bug in a macro.  

Please look at them carefully - some looked like spurious errors to me, until I 
read the code three times (the two bad release errors in NSString, for example 
- the dataWith*: messages should be initWith*:)

The one in GSRunLoopCtx.m looks like it could be responsible for the weirdness 
that a few people have experienced with run loops hanging - it looks like we're 
occasionally trying to poll a nonsense file descriptor.

The 50 dead stores are probably okay.  Some of the dead increments are bugs - 
people doing *i++ when they mean (*i)++, for example, although others are safe.

David

-- Sent from my Cray X1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]