Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169074 - [4.1/bad code] -ftree-vectorize breaks poppler/librsvg
Summary: [4.1/bad code] -ftree-vectorize breaks poppler/librsvg
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 151394
Blocks:
  Show dependency tree
 
Reported: 2007-03-03 02:19 UTC by spiritus
Modified: 2009-04-20 00:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
First case. Broken poppler-0.5.4-r1 code that references unaligned data in movapd produced by gcc-4.1.1-r3 (gcc-4.1.1-bug.txt,4.49 KB, text/plain)
2007-03-03 02:20 UTC, spiritus
Details
Second Case. Broken librsvg-2.16.1 code that references unaligned data, produced by gcc-4.1.2 (gcc-4.2.1-bug.txt,3.19 KB, text/plain)
2007-03-03 02:21 UTC, spiritus
Details
gcc-4.2.0-vectorize-pr25413.patch (gcc-4.2.0-vectorize-pr25413.patch,17.43 KB, patch)
2007-07-25 21:51 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description spiritus 2007-03-03 02:19:49 UTC
I have segfaults in applications built with CFLAGS="-march=prescott -O2 -mfpmath=sse -ftree-vectorize -pipe" with both gcc-4.1.1-r3 and gcc-4.1.2. 
The reason of segfaults is buggy code produced by gcc with this CFLAGS, that try to access unaligned memory in movapd(move two ALIGNED packed double-precision values) SSE-instruction.


Reproducible: Always

Steps to Reproduce:




$ emerge --info
Portage 2.1.2-r9 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.5-r0, 2.6.19-gentoo-r5 i686)
=================================================================
System uname: 2.6.19-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Fri, 02 Mar 2007 01:47:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.3.5-r3, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -mfpmath=sse -pipe"
CHOST="i686-pc-linux-gnu"
...
Comment 1 spiritus 2007-03-03 02:20:45 UTC
Created attachment 111878 [details]
First case. Broken poppler-0.5.4-r1 code that references unaligned data in movapd produced by gcc-4.1.1-r3
Comment 2 spiritus 2007-03-03 02:21:14 UTC
Created attachment 111879 [details]
Second Case. Broken librsvg-2.16.1 code that references unaligned data, produced by gcc-4.1.2
Comment 3 SpanKY gentoo-dev 2007-03-03 05:59:52 UTC
we know -ftree-vectorize breaks some things when SSE is involved, but we dont have any reduced testcases
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2007-04-08 09:28:27 UTC
this is sounding a bit like http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25413
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2007-07-25 21:51:27 UTC
Created attachment 126024 [details, diff]
gcc-4.2.0-vectorize-pr25413.patch

fixed in 4.2.2.  here's the patch.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2009-04-20 00:43:26 UTC
4.3 is stable now, which should have fixed this.