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 06:49:41 -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 #8 from ubizjak at gmail dot com 2007-09-20 06:49 -------
I can't confirm the failure (make check from zlib works OK for me), but there
is some suspicious code in inflate_fast(). When compiling (to be attached)
preprocessed testcase (using -O2 -msse2 -ftree-vectorize on i686), I got:
8052711: 31 d2 xor %edx,%edx
8052713: 83 c2 01 add $0x1,%edx
8052716: f3 0f 6f 41 10 movdqu 0x10(%ecx),%xmm0
805271b: f3 0f 6f 51 20 movdqu 0x20(%ecx),%xmm2
8052720: f3 0f 6f 09 movdqu (%ecx),%xmm1
8052724: 66 0f 7f 40 11 movdqa %xmm0,0x11(%eax)
8052729: 66 0f 7f 48 01 movdqa %xmm1,0x1(%eax)
805272e: 66 0f 7f 50 21 movdqa %xmm2,0x21(%eax)
8052733: 83 c1 30 add $0x30,%ecx
8052736: 83 c0 30 add $0x30,%eax
These lines correspond to line 235 of inffast.c:
}
while (len > 2) {
PUP(out) = PUP(from);
PUP(out) = PUP(from);
PUP(out) = PUP(from);
len -= 3;
}
These lines are preprocessed into:
while (len > 2) {
*++(out) = *++(from);
*++(out) = *++(from);
*++(out) = *++(from);
len -= 3;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32893