Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1641950 > unrolled thread
| Started by | Randy Dunlap <rdunlap@infradead.org> |
|---|---|
| First post | 2017-05-15 20:10 +0200 |
| Last post | 2017-05-18 09:20 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: sparse on scripts/kconfig/*.c Randy Dunlap <rdunlap@infradead.org> - 2017-05-15 20:10 +0200
Re: sparse on scripts/kconfig/*.c Dan Carpenter <dan.carpenter@oracle.com> - 2017-05-16 11:50 +0200
Re: sparse on scripts/kconfig/*.c Randy Dunlap <rdunlap@infradead.org> - 2017-05-18 05:00 +0200
Re: sparse on scripts/kconfig/*.c Dan Carpenter <dan.carpenter@oracle.com> - 2017-05-18 09:20 +0200
| From | Randy Dunlap <rdunlap@infradead.org> |
|---|---|
| Date | 2017-05-15 20:10 +0200 |
| Subject | Re: sparse on scripts/kconfig/*.c |
| Message-ID | <tHsBr-37u-5@gated-at.bofh.it> |
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. I see scripts/mod/* being built/checked ... but not scripts/kconfig/*. Any ideas? -- ~Randy
[toc] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-05-16 11:50 +0200 |
| Message-ID | <tHHh7-3Tm-9@gated-at.bofh.it> |
| In reply to | #1641950 |
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
[toc] | [prev] | [next] | [standalone]
| From | Randy Dunlap <rdunlap@infradead.org> |
|---|---|
| Date | 2017-05-18 05:00 +0200 |
| Message-ID | <tIjPs-3vN-7@gated-at.bofh.it> |
| In reply to | #1642372 |
On 05/16/17 02:43, Dan Carpenter wrote: > 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. OK, I don't need to do it then. However, there are several other config programs in scripts/kconfig/ that are not being checked by this. I did a 'git pull' for updates. On the rebuild, I get this error: macro_table.c:30:31: fatal error: cwchash/hashtable.h: No such file or directory #include "cwchash/hashtable.h" My problem? thanks for your help. -- ~Randy
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-05-18 09:20 +0200 |
| Message-ID | <tInT6-6TZ-45@gated-at.bofh.it> |
| In reply to | #1643754 |
On Wed, May 17, 2017 at 07:53:35PM -0700, Randy Dunlap wrote: > > I did a 'git pull' for updates. On the rebuild, I get this error: > > macro_table.c:30:31: fatal error: cwchash/hashtable.h: No such file or directory > #include "cwchash/hashtable.h" > > My problem? > > thanks for your help. That's weird. I haven't touched that code in years so I can't imagine what's going on. :/ My fresh clone works. regards, dan carpenter
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web