linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Smatch v1.56 released
@ 2012-03-04 18:04 Dan Carpenter
  2012-03-04 18:38 ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2012-03-04 18:04 UTC (permalink / raw)
  To: linux-kernel, smatch

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

It's been almost two years since the last Smatch release so probably
it's time for another one.

Smatch is a static analysis tool for C which has a lot of kernel
specific checks.

To run Smatch over the entire kernel use:
	smatch_scripts/test_kernel.sh

To run Smatch over just one .c file, start at the base of the kernel
tree and use:
	smatch_scripts/kchecker path/to/file.c

The main new thing, is the new cross function database work.  You
build a database on the first run and then use the information on
the second run.  The script for to build the database is:
	smatch_scripts/build_kernel_data.sh

Smatch still produces a lot of false positives.  Also as bugs get
fixed in the kernel, the false positive to real bug ratio gets
worse and worse.  But it does find real bugs as well.

There is a mailing list smatch@vger.kernel.org.

regards,
dan carpenter

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Smatch v1.56 released
  2012-03-04 18:04 Smatch v1.56 released Dan Carpenter
@ 2012-03-04 18:38 ` Joe Perches
  2012-03-04 19:08   ` Jiri Slaby
  2012-03-05  7:22   ` Dan Carpenter
  0 siblings, 2 replies; 5+ messages in thread
From: Joe Perches @ 2012-03-04 18:38 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-kernel, smatch

On Sun, 2012-03-04 at 21:04 +0300, Dan Carpenter wrote:
> Smatch still produces a lot of false positives.  Also as bugs get
> fixed in the kernel, the false positive to real bug ratio gets
> worse and worse.  But it does find real bugs as well.

Perhaps a database of known false positives and a mechanism
to use it to see only new instances could be created.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Smatch v1.56 released
  2012-03-04 18:38 ` Joe Perches
@ 2012-03-04 19:08   ` Jiri Slaby
  2012-03-05  7:22   ` Dan Carpenter
  1 sibling, 0 replies; 5+ messages in thread
From: Jiri Slaby @ 2012-03-04 19:08 UTC (permalink / raw)
  To: Joe Perches; +Cc: Dan Carpenter, linux-kernel, smatch

On 03/04/2012 07:38 PM, Joe Perches wrote:
> On Sun, 2012-03-04 at 21:04 +0300, Dan Carpenter wrote:
>> Smatch still produces a lot of false positives.  Also as bugs get
>> fixed in the kernel, the false positive to real bug ratio gets
>> worse and worse.  But it does find real bugs as well.
> 
> Perhaps a database of known false positives and a mechanism
> to use it to see only new instances could be created.

Yes, this is actually what xgcc has been doing. See [1] to see how to do
it more-or-less reliably.

[1] A system and language for building system-specific, static analyses,
Hallem, S. and Chelf, B. and Xie, Y. and Engler, D.

regards,
-- 
js

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Smatch v1.56 released
  2012-03-04 18:38 ` Joe Perches
  2012-03-04 19:08   ` Jiri Slaby
@ 2012-03-05  7:22   ` Dan Carpenter
  2012-03-07 16:47     ` Artem Bityutskiy
  1 sibling, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2012-03-05  7:22 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, smatch, Artem Bityutskiy

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

On Sun, Mar 04, 2012 at 10:38:50AM -0800, Joe Perches wrote:
> On Sun, 2012-03-04 at 21:04 +0300, Dan Carpenter wrote:
> > Smatch still produces a lot of false positives.  Also as bugs get
> > fixed in the kernel, the false positive to real bug ratio gets
> > worse and worse.  But it does find real bugs as well.
> 
> Perhaps a database of known false positives and a mechanism
> to use it to see only new instances could be created.

What I do is only look at new bugs.  I've got a script
	smatch_scripts/new_bugs.sh
That takes the output from two smatch runs and prints the bugs which
are new.

Artem has a set of scripts he's working on as well.

regards,
dan carpenter


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Smatch v1.56 released
  2012-03-05  7:22   ` Dan Carpenter
@ 2012-03-07 16:47     ` Artem Bityutskiy
  0 siblings, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2012-03-07 16:47 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Joe Perches, linux-kernel, smatch

On Mon, 2012-03-05 at 10:22 +0300, Dan Carpenter wrote:
> What I do is only look at new bugs.  I've got a script
> 	smatch_scripts/new_bugs.sh
> That takes the output from two smatch runs and prints the bugs which
> are new.
> 
> Artem has a set of scripts he's working on as well.

Yeah, I basically compile with W=1, run
sparse/coccinelle/cppcheck/smatch before and after a patch, compare the
build logs and report about only new warnings. Quite useful when you are
a maintainer.

-- 
Best Regards,
Artem Bityutskiy


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-07 16:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-04 18:04 Smatch v1.56 released Dan Carpenter
2012-03-04 18:38 ` Joe Perches
2012-03-04 19:08   ` Jiri Slaby
2012-03-05  7:22   ` Dan Carpenter
2012-03-07 16:47     ` Artem Bityutskiy

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).