From: Dan Carpenter <error27@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: smatch 1.53 released
Date: Tue, 2 Jun 2009 11:41:06 +0300 (EAT) [thread overview]
Message-ID: <alpine.DEB.2.00.0906021141010.19390@bicker> (raw)
Smatch is a source code checker for C. Right now the focus is on checking
for kernel bugs.
Here is are the instructions for installing and using:
git clone git://repo.or.cz/smatch.git
cd smatch
make
cd /usr/src/linux
make C=1 CHECK=/path/to/smatch modules bzImage | tee warns.txt
egrep '(warn|error):' warns.txt
Some weeks ago I pushed a bad commit. I haven't had internet access to
fix it until now. Sorry about that. It's fixed now.
Smatch v1.53 improves handling of compound implications. So if you have
code like this:
aaa = 0;
if (y)
aaa = 1;
if (x)
aaa = 2;
if (x && y)
__smatch_print_value("aaa"); // <-- prints aaa == 2
else
__smatch_print_value("aaa"); // <-- prints aaa == 0-2
This version also adds implications for switch statements.
if (!a && x != 42)
return;
switch(x) {
case 1:
a->member = 1; // <-- It's ok to dereference 'a' here.
case 42:
a->member = 1; // <-- smatch prints an error here.
regards,
dan carpenter
next reply other threads:[~2009-06-02 9:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 8:41 Dan Carpenter [this message]
2009-06-02 11:56 ` Andi Kleen
2009-06-04 19:50 ` Dan Carpenter
2009-06-04 20:10 ` Andi Kleen
2009-06-05 13:52 ` Dan Carpenter
2009-06-09 6:15 ` Christian Kujau
2009-06-16 14:54 ` Dan Carpenter
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=alpine.DEB.2.00.0906021141010.19390@bicker \
--to=error27@gmail.com \
--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
Powered by JetHome