linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [announce] smatch 1.54
Date: Sat, 9 Jan 2010 11:53:25 +0300	[thread overview]
Message-ID: <20100109085325.GE7840@bicker> (raw)

Smatch is a static checker for C.  Download it here:  
http://repo.or.cz/w/smatch.git

These days there are at least seven static checkers people are using 
to check the kernel source.  I can't swear that it's better than all
the others...  Smatch is open source.  It's written in C.  It's based
on sparse.  It's not horribly slow.  It has a git repo that gets updated
every few days.

Really what I would like is for smatch to become a smarter version
of checkpatch.pl.  I'd like it to be something simple, that catches many 
types of common bugs.  Something that people run before submitting code.
It's still probably a year away from being good enough for that.

Since the last release:
	* You need to pass "-p=kernel" to check the kernel source.
	make CHECK="/path/to/smatch -p=kernel" C=1 bzImage

	* The output has been cleaned up.  You can still pass --spammy
	and --info if you want the old output.

	* The array overflow check has improved and finds around 30
	bugs in the 2.6.33-rc2 kernel.

	* There is a new "dma on the stack" check that finds 382
	bugs.  The ones from drivers/usb/serial/ have fixes already.
	This could maybe be rewritten as a Coccinelle script.  The
	fixes are pretty mechanical.

That's the main stuff.

>From what I can tell about the open source checkers is that only the
authors use them.  Smatch has two users besides me (they do userspace 
stuff so they're not on this list), so it's one of the most popular.

Anyway, feedback is always good.  :)

regards,
dan carpenter

             reply	other threads:[~2010-01-09  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-09  8:53 Dan Carpenter [this message]
2010-06-02 19:20 ` [announce] smatch 1.54 Roland Dreier
2010-06-02 20:41   ` Dan Carpenter
2010-06-03  5:27     ` Roland Dreier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100109085325.GE7840@bicker \
    --to=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).