This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32893] zlib segfault in inflate_table() compiled w/ -O -msse2 ftree-vectorize
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Sep 2007 11:58:06 -0000
- Subject: [Bug target/32893] zlib segfault in inflate_table() compiled w/ -O -msse2 ftree-vectorize
- References: <bug-32893-10406@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from ubizjak at gmail dot com 2007-09-20 11:58 -------
I hope that following testcase can be of some use to somebody...
--cut here--
void __attribute__((noinline))
inflate_fast (unsigned char *from, unsigned char *out, unsigned int len)
{
while (len > 2)
{
*++(out) = *++(from);
*++(out) = *++(from);
*++(out) = *++(from);
len -= 3;
}
return;
}
int main()
{
unsigned int len = 13;
unsigned char x[13] = "Hello there! ...Hello there! ...Hello there! ...";
unsigned char y[13] = " ";
inflate_fast (x, y, len);
printf ("%s\n", y);
return 0;
}
--cut here--
This testcase produces movdqa with 1byte offset, but I'm not able to trigger
segfault with it, although it produces asm code as in comment #18.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32893