From: Hannes Eder <hannes@hanneseder.net>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christopher Li <sparse@chrisli.org>,
linux-sparse@vger.kernel.org,
Nicholas Mc Guire <der.herr@hofr.at>
Subject: Re: [bug, bisected, -chrisl] Segfault at evaluate.c:341
Date: Thu, 19 Mar 2009 19:38:51 +0100 [thread overview]
Message-ID: <154e089b0903191138x15b66808v70bc862d7a13e3c2@mail.gmail.com> (raw)
In-Reply-To: <20090319144622.GA28946@ZenIV.linux.org.uk>
On Thu, Mar 19, 2009 at 3:46 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Thu, Mar 19, 2009 at 02:49:21PM +0100, Hannes Eder wrote:
>> running sparse (from Christopher's tree) on linux-2.6/kernel/cred.c
>> (as of next-20090318, problem may appeared earlier, I have not tried
>> yet) causes a segfault at evaluate.c:341:
>>
>> if (type->type == SYM_NODE)
>> type = type->ctype.base_type;
>> if (type->type == SYM_TYPEOF) { <======== SEGFAULT (type == NULL)
>> type = evaluate_expression(type->initializer);
>> if (type->type == SYM_NODE)
>> type = type->ctype.base_type;
>> }
>>
>> the complete command line:
>>
>> sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise
>> -Wno-return-void -D__x86_64__ -m64 -nostdinc -isystem
>> /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include
>> -Wp,-MD,kernel/.cred.o.d -nostdinc -isystem
>> /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include -Iinclude
>> -I/home/hannes/linux-2.6/arch/x86/include -include
>> include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef
>> -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
>> -Werror-implicit-function-declaration -Os -m64 -mtune=generic
>> -mno-red-zone -mcmodel=kernel -funit-at-a-time
>> -maccumulate-outgoing-args -fstack-protector -fstack-protector-all
>> -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe
>> -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
>> -mno-sse2 -mno-3dnow -fno-omit-frame-pointer
>> -fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
>> -Wno-pointer-sign -D"KBUILD_STR(s)=#s"
>> -D"KBUILD_BASENAME=KBUILD_STR(cred)"
>> -D"KBUILD_MODNAME=KBUILD_STR(cred)" -D"DEBUG_HASH=36"
>> -D"DEBUG_HASH2=28" kernel/cred.c
>>
>>
>> using "git bisect" i narrowed to problem down to:
>>
>> [db31fd91f8231110ce8d8d48ce402f8cad068e44] Fix handling of ident-less
>> declarations
>>
>> Does that help? Should I provide any further information?
>
> Preprocessed input would help (note that knowing the kernel tree in
> question is not enough - .config affects what comes out of preprocessing,
> after all).
>
> Just slap -E in command line above and dump the output someplace public...
I use sparse with -E <rest of the options> and gcc -E -P <rest of the
options> to produce the files
kernel-cred-c.prep.sparse and kernel-cred-c.prep.gcc, which can be found at
http://hanneseder.net/sparse/kernel-cred-c.prep.tar.gz
$ sparse kernel-cred-c.prep.gcc
produces some warnings as usual.
$ sparse kernel-cred-c.prep.sparse
produces some warnings, a boatload of errors, and then segfaults.
hth,
-Hannes
--
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
next prev parent reply other threads:[~2009-03-19 18:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 13:49 [bug, bisected, -chrisl] Segfault at evaluate.c:341 Hannes Eder
2009-03-19 14:46 ` Al Viro
2009-03-19 18:32 ` Nicholas Mc Guire
2009-03-19 18:38 ` Hannes Eder [this message]
2009-03-19 19:14 ` Al Viro
2009-03-19 20:04 ` Christopher Li
2009-03-19 21:52 ` Al Viro
2009-03-19 22:09 ` Al Viro
2009-03-19 23:11 ` Christopher Li
2009-03-21 4:40 ` Al Viro
2009-03-21 17:28 ` Al Viro
2009-03-23 9:22 ` Christopher Li
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=154e089b0903191138x15b66808v70bc862d7a13e3c2@mail.gmail.com \
--to=hannes@hanneseder.net \
--cc=der.herr@hofr.at \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
--cc=viro@zeniv.linux.org.uk \
/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).