From: Dan Carpenter <dan.carpenter@oracle.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kbuild <linux-kbuild@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
smatch@vger.kernel.org
Subject: Re: sparse on scripts/kconfig/*.c
Date: Tue, 16 May 2017 12:43:08 +0300 [thread overview]
Message-ID: <20170516094308.c62gxxaopegqfxym@mwanda> (raw)
In-Reply-To: <605fc799-70c1-14af-904d-723b43ab9025@infradead.org>
On Mon, May 15, 2017 at 11:00:22AM -0700, Randy Dunlap wrote:
> On 05/10/17 13:53, Dan Carpenter wrote:
> > I have created some new tools to make this process easier.
> >
> > 1) First you still have to edit the Makefile:
> >
> > -HOSTCC = gcc
> > +HOSTCC = ~/progs/smatch/devel/cgcc
> >
> > 2) Build the data with this command:
> >
> > ~/progs/smatch/devel/smatch_scripts/build_generic_data.sh --target scripts/
> >
> > The --target scripts/ is because we want to run smatch on the scripts/
> > directory.
> >
> > 3) Run smatch:
> >
> > ~/progs/smatch/devel/smatch_scripts/test_generic.sh --target scripts/
> >
> > I just wrote this code today so it might be a bit rough perhaps. Let me
> > know if you have any issues. It doesn't find anything like I said
> > before, but hopefully this can help other people who want to run Smatch
> > on user space code.
>
> Thanks, Dan.
>
> I get this when running build_generic_data.sh:
>
> readline() on closed filehandle FILE at /home/rdunlap/projects/smatch/smatch_scripts/../smatch_data/db/fill_db_caller_info.pl line 33.
>
Thanks, I will push a fix for this later today.
> I see scripts/mod/* being built/checked ... but not scripts/kconfig/*.
>
> Any ideas?
>
Hm... It turns out we need to do a `make mrproper` between runs.
make mrproper ; make allmodconfig ; ~/progs/smatch/release/smatch_scripts/build_generic_data.sh --target scripts/
make mrproper ; make allmodconfig ; ~/progs/smatch/release/smatch_scripts/test_generic.sh --target scripts/
When I remove the grep out the autogenerated code this is what is left
grep -v .lex.c smatch_warns.txt | grep -v .tab.c
scripts/kconfig/expr.c:1027 expr_compare_type() info: ignoring unreachable code.
scripts/kconfig/symbol.c:1152 sym_check_print_recursive() error: we previously assumed 'prop' could be null (see line 1144)
scripts/kconfig/symbol.c:1153 sym_check_print_recursive() warn: curly braces intended?
scripts/kconfig/symbol.c:1155 sym_check_print_recursive() warn: inconsistent indenting
scripts/kconfig/menu.c:662 get_symbol_str() error: we previously assumed 'sym' could be null (see line 649)
scripts/mod/modpost.c:460 parse_elf() info: ignoring unreachable code.
scripts/mod/modpost.c:504 parse_elf() info: ignoring unreachable code.
regards,
dan carpenter
next prev parent reply other threads:[~2017-05-16 9:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 16:47 Randy Dunlap
2017-05-09 20:17 ` Christoph Hellwig
2017-05-10 0:27 ` Randy Dunlap
2017-05-10 7:28 ` Christoph Hellwig
2017-05-10 16:42 ` Randy Dunlap
2017-05-10 10:18 ` Dan Carpenter
2017-05-10 20:53 ` Dan Carpenter
2017-05-15 18:00 ` Randy Dunlap
2017-05-16 9:43 ` Dan Carpenter [this message]
2017-05-18 2:53 ` Randy Dunlap
2017-05-18 7:14 ` 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=20170516094308.c62gxxaopegqfxym@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=smatch@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
all inboxes | Powered by JetHome®