linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Stefaniuc <mstefani@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: smatch-discuss@lists.sourceforge.net, linux-sparse@vger.kernel.org
Subject: Re: Moving smatch to use sparse
Date: Thu, 05 Oct 2006 17:52:25 +0200	[thread overview]
Message-ID: <45252A39.3050008@redhat.com> (raw)
In-Reply-To: <a63d67fe0610050141x251253fei59b93fff28505dc4@mail.gmail.com>

Hello Dan,

Dan Carpenter wrote:
> Work on smatch is going ahead.  I have one real life check is working
> and I've added a patched up the core code quite a bit.
great work! What about the old smatch.pm and perl scripts? Will i be
still able to use those or would i have to port them over? I'm still
using the old smatch on checking Wine.

bye
	michael

> 
> Makefile               |   15
> check_derefed_params.c |  171 +++++
> check_null_deref.c     |  178 +++++
> smatch.c               |   33 +
> smatch.h               |  138 ++++
> smatch_flow.c          |  462 ++++++++++++++
> smatch_helper.c        |  180 +++++
> smatch_hooks.c         |  125 ++++
> smatch_states.c        |  587 +++++++++++++++++++
> 9 files changed, 1888 insertions(+), 1 deletion(-)
> 
> check_derefed_params prints out a message every time a function
> dereferences a parameter without checking.  check_null_deref.c prints
> out a message whenever code calls a funtion with possibly null
> parameters.  Afterwards you sort the output for functions that are in
> both lists like this:
> 
>   grep Und warns.out | cut -d ' ' -f 6,7 | sort | uniq > tmp
>   grep unchecked warns.out | cut -d ' ' -f 7,8 | sort | uniq > tmp2
>   cat tmp* | sort | uniq -c | sort -n | grep " 2 "
> 
> If you run the code with an allno config then you get 9 potential
> errors but only one is real...
> 
> In drivers/char/tty_ioctl.c line 549, ld could possibly NULL if arg is
> TCIFLUSH, TCIOFLUSH or TCOFLUSH which leads to a BUG_ON when
> tty_ldisc_deref() is called.
> 
> It kind sucks to get so many false positives, but the old version of
> smatch would have had more even more because it wasn't as good at
> handling compound conditions.
> 
> The code is on:  http://smatch.sourceforge.net/sparse/


-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart

  parent reply	other threads:[~2006-10-05 15:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a63d67fe0607140925h3665cd98ibc2fab07f6f80360@mail.gmail.com>
2006-07-16  0:42 ` Moving smatch to use sparse Dan Carpenter
2006-10-05  8:41   ` Dan Carpenter
2006-10-05  9:26     ` Sam Ravnborg
2006-10-05  9:49       ` Dan Carpenter
2006-10-05 10:25         ` Jörn Engel
2006-10-06  6:31           ` Dan Carpenter
2006-10-05 15:52     ` Michael Stefaniuc [this message]
2006-10-05 20:58       ` Dan Carpenter
2006-10-05 22:46         ` Michael Stefaniuc
2006-10-06  8:57           ` 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=45252A39.3050008@redhat.com \
    --to=mstefani@redhat.com \
    --cc=error27@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=smatch-discuss@lists.sourceforge.net \
    /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).