linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sparse segfault in kernel -mm tree
@ 2007-03-06  1:53 Randy Dunlap
  2007-03-06  2:33 ` Christopher Li
  0 siblings, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2007-03-06  1:53 UTC (permalink / raw)
  To: linux-sparse

Hi,

sparse (latest git tarball from DaveJones) segfaults when
checking the 2.6.21-rc2-mm1 tree:


  CHECK   drivers/net/vioc/vioc_provision.c
/bin/sh: line 1:  4021 Segmentation fault      sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -D__x86_64__ -m64 -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -Wp,-MD,drivers/net/vioc/.vioc_provision.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vioc_pr
 ovision)" -D"KBUILD_MODNAME=KBUILD_STR(vioc)" drivers/net/vioc/vioc_provision.c
make[3]: *** [drivers/net/vioc/vioc_provision.o] Error 139
make[2]: *** [drivers/net/vioc] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

sparse[4021]: segfault at 0000000000000050 rip 000000000040fd63 rsp 00007fff6e1cccb0 error 4

---
~Randy

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06  1:53 sparse segfault in kernel -mm tree Randy Dunlap
@ 2007-03-06  2:33 ` Christopher Li
  2007-03-06  5:04   ` Randy Dunlap
  0 siblings, 1 reply; 16+ messages in thread
From: Christopher Li @ 2007-03-06  2:33 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-sparse

Hmm, It does not happen on tip of git tree even on 64bit boxes.

I can't reproduce it with a script that copy your command line
for mm1 tree either. I need to modify the gcc include path.
But after that it pass fine.

Can you send me your .config file?

If you have other ways to narrow down the bug that will be great.

Sorry I am out of luck to reproduce it.

Chris


On Mon, Mar 05, 2007 at 05:53:22PM -0800, Randy Dunlap wrote:
> Hi,
> 
> sparse (latest git tarball from DaveJones) segfaults when
> checking the 2.6.21-rc2-mm1 tree:
> 
> 
>   CHECK   drivers/net/vioc/vioc_provision.c
> /bin/sh: line 1:  4021 Segmentation fault      sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -D__x86_64__ -m64 -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -Wp,-MD,drivers/net/vioc/.vioc_provision.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vioc_
 provision)" -D"KBUILD_MODNAME=KBUILD_STR(vioc)" drivers/net/vioc/vioc_provision.c
> make[3]: *** [drivers/net/vioc/vioc_provision.o] Error 139
> make[2]: *** [drivers/net/vioc] Error 2
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2
> 
> sparse[4021]: segfault at 0000000000000050 rip 000000000040fd63 rsp 00007fff6e1cccb0 error 4
> 
> ---
> ~Randy
> -
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06  2:33 ` Christopher Li
@ 2007-03-06  5:04   ` Randy Dunlap
  2007-03-06  5:42     ` Pavel Roskin
  0 siblings, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2007-03-06  5:04 UTC (permalink / raw)
  To: Christopher Li; +Cc: linux-sparse

On Mon, 5 Mar 2007 18:33:51 -0800 Christopher Li wrote:

> Hmm, It does not happen on tip of git tree even on 64bit boxes.

I'm on x86_64.

> I can't reproduce it with a script that copy your command line
> for mm1 tree either. I need to modify the gcc include path.
> But after that it pass fine.
> 
> Can you send me your .config file?

make allmodconfig

> If you have other ways to narrow down the bug that will be great.
> 
> Sorry I am out of luck to reproduce it.
> 
> Chris
> 
> 
> On Mon, Mar 05, 2007 at 05:53:22PM -0800, Randy Dunlap wrote:
> > Hi,
> > 
> > sparse (latest git tarball from DaveJones) segfaults when
> > checking the 2.6.21-rc2-mm1 tree:
> > 
> > 
> >   CHECK   drivers/net/vioc/vioc_provision.c
> > /bin/sh: line 1:  4021 Segmentation fault      sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -D__x86_64__ -m64 -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -Wp,-MD,drivers/net/vioc/.vioc_provision.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vio
 c_provision)" -D"KBUILD_MODNAME=KBUILD_STR(vioc)" drivers/net/vioc/vioc_provision.c
> > make[3]: *** [drivers/net/vioc/vioc_provision.o] Error 139
> > make[2]: *** [drivers/net/vioc] Error 2
> > make[1]: *** [drivers/net] Error 2
> > make: *** [drivers] Error 2
> > 
> > sparse[4021]: segfault at 0000000000000050 rip 000000000040fd63 rsp 00007fff6e1cccb0 error 4
> > 
> > ---

---
~Randy

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06  5:04   ` Randy Dunlap
@ 2007-03-06  5:42     ` Pavel Roskin
  2007-03-06  6:40       ` Randy Dunlap
  0 siblings, 1 reply; 16+ messages in thread
From: Pavel Roskin @ 2007-03-06  5:42 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Christopher Li, linux-sparse

Quoting Randy Dunlap <rdunlap@xenotime.net>:
> > I can't reproduce it with a script that copy your command line
> > for mm1 tree either. I need to modify the gcc include path.
> > But after that it pass fine.
> >
> > Can you send me your .config file?
>
> make allmodconfig

There is a relatively easy way to get the problematic file.  Remove the
corresponding object file and run this in the Linux build tree:

make CC="gcc -save-temps -D__CHECKER__"

This will likely fail, but there will be a file with *.i extension that would
probably cause the same problem with sparse.  That file can be renamed back to
*.c, indented and, time permitting, reduced to a few lines.

--
Regards,
Pavel Roskin

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06  5:42     ` Pavel Roskin
@ 2007-03-06  6:40       ` Randy Dunlap
  2007-03-06 18:19         ` Pavel Roskin
  0 siblings, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2007-03-06  6:40 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Christopher Li, linux-sparse

On Tue,  6 Mar 2007 00:42:43 -0500 Pavel Roskin wrote:

> Quoting Randy Dunlap <rdunlap@xenotime.net>:
> > > I can't reproduce it with a script that copy your command line
> > > for mm1 tree either. I need to modify the gcc include path.
> > > But after that it pass fine.
> > >
> > > Can you send me your .config file?
> >
> > make allmodconfig
> 
> There is a relatively easy way to get the problematic file.  Remove the
> corresponding object file and run this in the Linux build tree:
> 
> make CC="gcc -save-temps -D__CHECKER__"
> 
> This will likely fail, but there will be a file with *.i extension that would
> probably cause the same problem with sparse.  That file can be renamed back to
> *.c, indented and, time permitting, reduced to a few lines.

Sorry, that's not giving me anything from drivers/net/vioc/.
It dies on init/main.c:

init/main.c: At top level:
init/main.c:431: warning: 'context' attribute directive ignored
init/main.c:431: error: expected ',' or ';' before '{' token


---
~Randy

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06  6:40       ` Randy Dunlap
@ 2007-03-06 18:19         ` Pavel Roskin
  2007-03-06 20:58           ` Randy Dunlap
  0 siblings, 1 reply; 16+ messages in thread
From: Pavel Roskin @ 2007-03-06 18:19 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Christopher Li, linux-sparse

On Mon, 2007-03-05 at 22:40 -0800, Randy Dunlap wrote:
> On Tue,  6 Mar 2007 00:42:43 -0500 Pavel Roskin wrote:
> > There is a relatively easy way to get the problematic file.  Remove the
> > corresponding object file and run this in the Linux build tree:
> > 
> > make CC="gcc -save-temps -D__CHECKER__"
> > 
> > This will likely fail, but there will be a file with *.i extension that would
> > probably cause the same problem with sparse.  That file can be renamed back to
> > *.c, indented and, time permitting, reduced to a few lines.
> 
> Sorry, that's not giving me anything from drivers/net/vioc/.
> It dies on init/main.c:
> 
> init/main.c: At top level:
> init/main.c:431: warning: 'context' attribute directive ignored
> init/main.c:431: error: expected ',' or ';' before '{' token

My bad, sorry.  I tested in on a standalone driver.  Here's a version
tested on the actual kernel tree:

make CC="gcc -save-temps -D__CHECKER__" KBUILD_NOCMDDEP=1

KBUILD_NOCMDDEP=1 prevents rebuilding other files when CC changes.  If
you still get stuck on another file, please also add "-k" to the command
line.

-- 
Regards,
Pavel Roskin

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06 18:19         ` Pavel Roskin
@ 2007-03-06 20:58           ` Randy Dunlap
  2007-03-06 22:28             ` Christopher Li
  0 siblings, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2007-03-06 20:58 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Christopher Li, linux-sparse

On Tue, 06 Mar 2007 13:19:37 -0500 Pavel Roskin wrote:

> On Mon, 2007-03-05 at 22:40 -0800, Randy Dunlap wrote:
> > On Tue,  6 Mar 2007 00:42:43 -0500 Pavel Roskin wrote:
> > > There is a relatively easy way to get the problematic file.  Remove the
> > > corresponding object file and run this in the Linux build tree:
> > > 
> > > make CC="gcc -save-temps -D__CHECKER__"
> > > 
> > > This will likely fail, but there will be a file with *.i extension that would
> > > probably cause the same problem with sparse.  That file can be renamed back to
> > > *.c, indented and, time permitting, reduced to a few lines.
> > 
> > Sorry, that's not giving me anything from drivers/net/vioc/.
> > It dies on init/main.c:
> > 
> > init/main.c: At top level:
> > init/main.c:431: warning: 'context' attribute directive ignored
> > init/main.c:431: error: expected ',' or ';' before '{' token
> 
> My bad, sorry.  I tested in on a standalone driver.  Here's a version
> tested on the actual kernel tree:
> 
> make CC="gcc -save-temps -D__CHECKER__" KBUILD_NOCMDDEP=1
> 
> KBUILD_NOCMDDEP=1 prevents rebuilding other files when CC changes.  If
> you still get stuck on another file, please also add "-k" to the command
> line.

OK, that produced a large .i file and running:
  sparse vioc_provision.i
does reproduce the segfault, so now I am cutting down the size of
the .i file, then I'll send it in.

Thanks.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06 20:58           ` Randy Dunlap
@ 2007-03-06 22:28             ` Christopher Li
  2007-03-06 23:12               ` Randy Dunlap
  2007-03-07  3:04               ` Randy Dunlap
  0 siblings, 2 replies; 16+ messages in thread
From: Christopher Li @ 2007-03-06 22:28 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Pavel Roskin, linux-sparse

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

Here is my version base on your email.

I need to change the gcc include path though. But it does not crash on me.

I did not get crash on allmodconfig either.

Chris

On 3/6/07, Randy Dunlap <rdunlap@xenotime.net> wrote:
> On Tue, 06 Mar 2007 13:19:37 -0500 Pavel Roskin wrote:
> OK, that produced a large .i file and running:
>   sparse vioc_provision.i
> does reproduce the segfault, so now I am cutting down the size of
> the .i file, then I'll send it in.
>
> Thanks.

[-- Attachment #2: bad.sh --]
[-- Type: application/x-sh, Size: 933 bytes --]

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06 22:28             ` Christopher Li
@ 2007-03-06 23:12               ` Randy Dunlap
  2007-03-07  2:43                 ` Morten Welinder
  2007-03-07  3:04               ` Randy Dunlap
  1 sibling, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2007-03-06 23:12 UTC (permalink / raw)
  To: Christopher Li; +Cc: Pavel Roskin, linux-sparse

On Tue, 6 Mar 2007 14:28:24 -0800 Christopher Li wrote:

> Here is my version base on your email.
> 
> I need to change the gcc include path though. But it does not crash on me.
> 
> I did not get crash on allmodconfig either.
> 
> Chris

Hi,
OK, uh, what did we expect from this?
I changed /redhat/ to /suse/ and lib to lib64.  Here's what I got:
(split into multiple lines for my email client)


/home/rddunlap/scripts/cli_bad.sh: line 1: 17720 Segmentation fault      sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -D__x86_64__ -m64 -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -Wp,-MD,drivers/net/vioc/.vioc_provision.o.d -nostdinc 
-isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 
-mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vioc_provision)" -D"KBUILD_MODNAME=KBUILD_STR(vioc)" drivers/net/vioc/vioc_provision.c


It looks like the problem (as I experience it) is in
drivers/net/vioc/vioc_provision.c, in this struct:
(it just takes a boatload of header files to get to this)

	static struct vnic_prov_def vnic_set_0 = {
	.rxd_ring[0].buf_size = RXDQ_SMALL_ALLOC_BUFSIZE,
	.rxd_ring[0].entries = RXDQ_SMALL_ENTRIES,
	.rxd_ring[0].id = 0,
	.rxd_ring[0].state = 1,
	.rxd_ring[1].buf_size = RXDQ_STD_ALLOC_BUFSIZE,
	.rxd_ring[1].entries = RXDQ_STD_ENTRIES,
	.rxd_ring[1].id = 1,
	.rxd_ring[1].state = 1,
	.rxd_ring[2].buf_size = RXDQ_JUMBO_ALLOC_BUFSIZE,
	.rxd_ring[2].entries = RXDQ_JUMBO_ENTRIES,
	.rxd_ring[2].id = 2,
	.rxd_ring[2].state = 1,
	.tx_entries = TXQ_ENTRIES,.rxc_entries = RXC_ENTRIES,.rxc_id =
	    0,.rxc_intr_id = 0
};


but I'll keep reducing the size of the .i file to try to be
sure about this.



> On 3/6/07, Randy Dunlap <rdunlap@xenotime.net> wrote:
> > On Tue, 06 Mar 2007 13:19:37 -0500 Pavel Roskin wrote:
> > OK, that produced a large .i file and running:
> >   sparse vioc_provision.i
> > does reproduce the segfault, so now I am cutting down the size of
> > the .i file, then I'll send it in.


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06 23:12               ` Randy Dunlap
@ 2007-03-07  2:43                 ` Morten Welinder
  2007-03-07  3:02                   ` Pavel Roskin
  0 siblings, 1 reply; 16+ messages in thread
From: Morten Welinder @ 2007-03-07  2:43 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Christopher Li, Pavel Roskin, linux-sparse

Try running sparse under valgrind to see if there is some memory
corruption at an
earlier stage.

Morten

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

* Re: sparse segfault in kernel -mm tree
  2007-03-07  2:43                 ` Morten Welinder
@ 2007-03-07  3:02                   ` Pavel Roskin
  0 siblings, 0 replies; 16+ messages in thread
From: Pavel Roskin @ 2007-03-07  3:02 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Christopher Li, linux-sparse, Morten Welinder

On Tue, 2007-03-06 at 21:43 -0500, Morten Welinder wrote:
> Try running sparse under valgrind to see if there is some memory
> corruption at an
> earlier stage.

Randy,

maybe you'll just post the .i file as is (perhaps compressed with
bzip2)?  It looks like your post has generated lots of interest, but
nobody can reproduce the problem.  It's a much bigger waste of bandwidth
to have others download the -mm kernel.

If the file is too large for the list, please send it to me, and I'll
put it online.  Or put that file on pastebin.com or turboupload.com.

If I can reproduce the bug, with or without valgrind, I'll reduce the
file to the minimal required for the bug to be see.  I did it before.

If sparse crashes for you only, then you'll need to debug it on your
system, and it doesn't matter how big the file is.  What matters is the
backtrace and other info from gdb.

-- 
Regards,
Pavel Roskin

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

* Re: sparse segfault in kernel -mm tree
  2007-03-06 22:28             ` Christopher Li
  2007-03-06 23:12               ` Randy Dunlap
@ 2007-03-07  3:04               ` Randy Dunlap
  2007-03-07  3:12                 ` Christopher Li
  1 sibling, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2007-03-07  3:04 UTC (permalink / raw)
  To: Christopher Li; +Cc: Pavel Roskin, linux-sparse

On Tue, 6 Mar 2007 14:28:24 -0800 Christopher Li wrote:

> Here is my version base on your email.
> 
> I need to change the gcc include path though. But it does not crash on me.
> 
> I did not get crash on allmodconfig either.

gdb backtrace of sparse segfault:


(gdb) set args vioc_prov.i
(gdb) run
Starting program: /home/rddunlap/bin/sparse vioc_prov.i

Program received signal SIGSEGV, Segmentation fault.
0x000000000040fd63 in expand_expression (expr=<value optimized out>)
    at expand.c:875
875                     if (a && a->ctype->bit_size && bit_offset(a) == bit_offset(b)) {
(gdb) bt
#0  0x000000000040fd63 in expand_expression (expr=<value optimized out>)
    at expand.c:875
#1  0x00000000004105a9 in expand_symbol (sym=<value optimized out>)
    at expand.c:993
#2  0x0000000000404581 in check_symbols (list=<value optimized out>)
    at sparse.c:265
#3  0x000000000040492a in main (argc=<value optimized out>, 
    argv=<value optimized out>) at sparse.c:280
(gdb) 



> Chris
> 
> On 3/6/07, Randy Dunlap <rdunlap@xenotime.net> wrote:
> > On Tue, 06 Mar 2007 13:19:37 -0500 Pavel Roskin wrote:
> > OK, that produced a large .i file and running:
> >   sparse vioc_provision.i
> > does reproduce the segfault, so now I am cutting down the size of
> > the .i file, then I'll send it in.


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: sparse segfault in kernel -mm tree
  2007-03-07  3:04               ` Randy Dunlap
@ 2007-03-07  3:12                 ` Christopher Li
  2007-03-07  3:51                   ` Dave Jones
  2007-03-07  4:13                   ` Randy Dunlap
  0 siblings, 2 replies; 16+ messages in thread
From: Christopher Li @ 2007-03-07  3:12 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Pavel Roskin, linux-sparse

It seems that you are missing this change:

user:        Christopher Li <sparse@chrisli.org>
date:        Thu Feb 22 18:28:23 2007 -0800
summary:     Fix the segfault when initializer has unknown symbol

diff -r 9c425042a094 -r d22e36f6c600 expand.c
--- a/expand.c  Wed Feb 21 14:05:52 2007 -0800
+++ b/expand.c  Thu Feb 22 18:28:23 2007 -0800
@@ -872,7 +872,7 @@ static void verify_nonoverlapping(struct
        struct expression *b;

        FOR_EACH_PTR(*list, b) {
-               if (a && a->ctype->bit_size && bit_offset(a) == bit_offset(b)) {
+               if (a && a->ctype && a->ctype->bit_size &&
bit_offset(a) == bit_offset(b)) {
                        sparse_error(a->pos, "Initializer entry defined twice");
                        info(b->pos, "  also defined here");
                        return;

Many be the snapshot script need a restart again?

Chris

On 3/6/07, Randy Dunlap <rdunlap@xenotime.net> wrote:
> On Tue, 6 Mar 2007 14:28:24 -0800 Christopher Li wrote:
> 875                     if (a && a->ctype->bit_size && bit_offset(a) == bit_offset(b)) {
> (gdb) bt
> #0  0x000000000040fd63 in expand_expression (expr=<value optimized out>)

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

* Re: sparse segfault in kernel -mm tree
  2007-03-07  3:12                 ` Christopher Li
@ 2007-03-07  3:51                   ` Dave Jones
  2007-03-07  4:13                   ` Randy Dunlap
  1 sibling, 0 replies; 16+ messages in thread
From: Dave Jones @ 2007-03-07  3:51 UTC (permalink / raw)
  To: Christopher Li; +Cc: Randy Dunlap, Pavel Roskin, linux-sparse

On Tue, Mar 06, 2007 at 07:12:53PM -0800, Christopher Li wrote:
 > It seems that you are missing this change:
 > 
 > user:        Christopher Li <sparse@chrisli.org>
 > date:        Thu Feb 22 18:28:23 2007 -0800
 > summary:     Fix the segfault when initializer has unknown symbol
 > 
 > diff -r 9c425042a094 -r d22e36f6c600 expand.c
 > --- a/expand.c  Wed Feb 21 14:05:52 2007 -0800
 > +++ b/expand.c  Thu Feb 22 18:28:23 2007 -0800
 > @@ -872,7 +872,7 @@ static void verify_nonoverlapping(struct
 >         struct expression *b;
 > 
 >         FOR_EACH_PTR(*list, b) {
 > -               if (a && a->ctype->bit_size && bit_offset(a) == bit_offset(b)) {
 > +               if (a && a->ctype && a->ctype->bit_size &&
 > bit_offset(a) == bit_offset(b)) {
 >                         sparse_error(a->pos, "Initializer entry defined twice");
 >                         info(b->pos, "  also defined here");
 >                         return;
 > 
 > Many be the snapshot script need a restart again?

Kicked. Should work again now.
(For something so trivial, that thing is really high maintainence :)

	Dave

-- 
http://www.codemonkey.org.uk

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

* Re: sparse segfault in kernel -mm tree
  2007-03-07  3:12                 ` Christopher Li
  2007-03-07  3:51                   ` Dave Jones
@ 2007-03-07  4:13                   ` Randy Dunlap
  2007-03-07  4:27                     ` Randy Dunlap
  1 sibling, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2007-03-07  4:13 UTC (permalink / raw)
  To: Christopher Li; +Cc: Pavel Roskin, linux-sparse

On Tue, 6 Mar 2007 19:12:53 -0800 Christopher Li wrote:

> It seems that you are missing this change:
> 
> user:        Christopher Li <sparse@chrisli.org>
> date:        Thu Feb 22 18:28:23 2007 -0800
> summary:     Fix the segfault when initializer has unknown symbol
> 
> diff -r 9c425042a094 -r d22e36f6c600 expand.c
> --- a/expand.c  Wed Feb 21 14:05:52 2007 -0800
> +++ b/expand.c  Thu Feb 22 18:28:23 2007 -0800
> @@ -872,7 +872,7 @@ static void verify_nonoverlapping(struct
>         struct expression *b;
> 
>         FOR_EACH_PTR(*list, b) {
> -               if (a && a->ctype->bit_size && bit_offset(a) == bit_offset(b)) {
> +               if (a && a->ctype && a->ctype->bit_size &&
> bit_offset(a) == bit_offset(b)) {
>                         sparse_error(a->pos, "Initializer entry defined twice");
>                         info(b->pos, "  also defined here");
>                         return;
> 
> Many be the snapshot script need a restart again?

Hi,
OK, I hope that's it.  I'll check it out soon.
If that doesn't fix it, I'll post the .i file.

Thanks.

> Chris
> 
> On 3/6/07, Randy Dunlap <rdunlap@xenotime.net> wrote:
> > On Tue, 6 Mar 2007 14:28:24 -0800 Christopher Li wrote:
> > 875                     if (a && a->ctype->bit_size && bit_offset(a) == bit_offset(b)) {
> > (gdb) bt
> > #0  0x000000000040fd63 in expand_expression (expr=<value optimized out>)



---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: sparse segfault in kernel -mm tree
  2007-03-07  4:13                   ` Randy Dunlap
@ 2007-03-07  4:27                     ` Randy Dunlap
  0 siblings, 0 replies; 16+ messages in thread
From: Randy Dunlap @ 2007-03-07  4:27 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Pavel Roskin

On Tue, 6 Mar 2007 20:13:17 -0800 Randy Dunlap wrote:

> On Tue, 6 Mar 2007 19:12:53 -0800 Christopher Li wrote:
> 
> > It seems that you are missing this change:
> > 
> > user:        Christopher Li <sparse@chrisli.org>
> > date:        Thu Feb 22 18:28:23 2007 -0800
> > summary:     Fix the segfault when initializer has unknown symbol
> > 
> > diff -r 9c425042a094 -r d22e36f6c600 expand.c
> > --- a/expand.c  Wed Feb 21 14:05:52 2007 -0800
> > +++ b/expand.c  Thu Feb 22 18:28:23 2007 -0800
> > @@ -872,7 +872,7 @@ static void verify_nonoverlapping(struct
> >         struct expression *b;
> > 
> >         FOR_EACH_PTR(*list, b) {
> > -               if (a && a->ctype->bit_size && bit_offset(a) == bit_offset(b)) {
> > +               if (a && a->ctype && a->ctype->bit_size &&
> > bit_offset(a) == bit_offset(b)) {
> >                         sparse_error(a->pos, "Initializer entry defined twice");
> >                         info(b->pos, "  also defined here");
> >                         return;
> > 
> > Many be the snapshot script need a restart again?
> 
> Hi,
> OK, I hope that's it.  I'll check it out soon.
> If that doesn't fix it, I'll post the .i file.


Hi all,
Working now, thanks to Chris for his patch and noticing that I
didn't have it.  /me /kicks snapshots.  :)

Sorry about the troubles.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

end of thread, other threads:[~2007-03-07  4:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06  1:53 sparse segfault in kernel -mm tree Randy Dunlap
2007-03-06  2:33 ` Christopher Li
2007-03-06  5:04   ` Randy Dunlap
2007-03-06  5:42     ` Pavel Roskin
2007-03-06  6:40       ` Randy Dunlap
2007-03-06 18:19         ` Pavel Roskin
2007-03-06 20:58           ` Randy Dunlap
2007-03-06 22:28             ` Christopher Li
2007-03-06 23:12               ` Randy Dunlap
2007-03-07  2:43                 ` Morten Welinder
2007-03-07  3:02                   ` Pavel Roskin
2007-03-07  3:04               ` Randy Dunlap
2007-03-07  3:12                 ` Christopher Li
2007-03-07  3:51                   ` Dave Jones
2007-03-07  4:13                   ` Randy Dunlap
2007-03-07  4:27                     ` Randy Dunlap

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