lkml.org 
[lkml]   [2013]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsmatch v1.59 released
Smatch is a C static checker with a lot of kernel specific checks.

This release has several new tricks:

1) Small functions are parsed inline now. That makes it more accurate
and now even without the database configured, you have at least some
cross function analysis.

2) The way smatch handles math was completely rewritten and should be
more accurate.

3) Comparisons between variables are recorded. So even if you don't
know the return value, maybe you know that it is less than or equal to
parameter 2. (This requires the database to be set up).

Btw, having the database set up is super useful for understanding code.
Say you want to know how lifebook_limit_serio3() is called you can type:
`smbdb.py lifebook_limit_serio3` and it's simple enough to see that
(struct dmi_system_id)->callback() is called from dmi_check_system().

The command to set up the database is:
~/path/to/smatch/smatch_scripts/build_kernel_data.sh

To run smatch on the kernel source:
~/path/to/smatch/smatch_scripts/test_kernel.sh

To test a specific file:
~/path/to/smatch/smatch_scripts/kchecker drivers/file.c

regards,
dan carpenter



\
 
 \ /
  Last update: 2013-07-15 11:02    [W:0.233 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site