From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: linux-sparse@vger.kernel.org
Subject: sparse-llvm segfaults when passing a struct pointer
Date: Thu, 19 Jul 2012 15:17:25 +0200 [thread overview]
Message-ID: <20120719131725.GA2836@debian.debian> (raw)
Hi,
compiling a little real-world program with sparse-llvm, it segfaulted.
Using a tool called "delta"[1] and some bash scripting, I managed to
reduce the code to this test case:
//struct foo {int a;};
//struct foo;
extern struct foo *foop;
extern void func(struct foo *f);
int main(int argc, char **argv) {
func(foop);
}
(Uncommenting the commented lines doesn't change the crashing)
gdb gives me this backtrace:
(gdb) bt
#0 0x080b86c1 in LLVMBuildPtrToInt ()
#1 0x080530fd in output_op_load (insn=0xb742512c, fn=0xbf85624c) at sparse-llvm.c:595
#2 output_insn (insn=0xb742512c, fn=0xbf85624c) at sparse-llvm.c:1008
#3 output_bb (generation=7, fn=0xbf85624c, bb=<optimized out>) at sparse-llvm.c:1096
#4 output_fn (module=0xb7738f0c, module@entry=0x8ccc750, ep=<error reading variable: Unhandled dwarf expression opcode 0xfa>,
ep=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at sparse-llvm.c:1166
#5 0x080507ec in compile (list=0xb773858c, module=0x8ccc750) at sparse-llvm.c:1227
#6 main (argc=2, argv=0xbf856684) at sparse-llvm.c:1246
I'm using llvm version 3.0 (package version 1:3.0-14) from Debian and
sparse v0.4.4-100-g063236f (the most recent commit in git).
Thanks,
Jonathan Neuschäfer
[1] http://delta.tigris.org/
PS: I've also found sparse-llvm to crash if the source file contains
only the following (obviously incorrect) line, but I considered that
lower priority, since it is already incorrect code:
static void out_byte(FILE *out, unsigned char byte) {
--
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 reply other threads:[~2012-07-19 13:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 13:17 Jonathan Neuschäfer [this message]
2012-07-20 8:21 ` sparse-llvm segfaults when passing a struct pointer Pekka Enberg
2012-07-20 20:12 ` Linus Torvalds
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=20120719131725.GA2836@debian.debian \
--to=j.neuschaefer@gmx.net \
--cc=linux-sparse@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.