This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

clang static source analysis


This morning on fedora-devel, Jim Meyering raved about a static source
analyzer called "clang":

<https://www.redhat.com/archives/fedora-devel-list/2009-September/msg00152.html>

It looked easy enough to use, so I compiled it and ran it on systemtap's
source.  Unfortunately, it seemed to have trouble with C++ code (which
might be a configuration issue), but it did run successfully on the C
source of staprun.

It found 5 bugs there, 4 of which look fairly benign (dead assignments).
 You can see its output here:

<http://people.redhat.com/dsmith/scan/2009-09-04-1/>

The 4th bug it found looks like a real bug.  Dave, can you look at
either the 4th bug at the link above or at line 149 of modverify.c?  It
looks like that 'rc = 0' should be a 'return 0;' (otherwise we print an
error but continue on anyway).

I'll continue to play around with this a bit and if I get the C++
analysis going I'll post new results.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]