Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230397 - fontconfig makes firefox 3 and acroread-8.1.2-r2 segfault, if compiled with gcc-4.3.1 and heavy optimizations
Summary: fontconfig makes firefox 3 and acroread-8.1.2-r2 segfault, if compiled with g...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-01 20:57 UTC by Risto A. Paju
Modified: 2008-07-01 22:34 UTC (History)
0 users

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


Attachments
emerge --info (emergeinfo.txt,4.08 KB, text/plain)
2008-07-01 20:57 UTC, Risto A. Paju
Details
Working ebuild that filters out -ffast-math (fontconfig-2.6.0-r3.ebuild,2.92 KB, text/plain)
2008-07-01 22:34 UTC, Risto A. Paju
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Risto A. Paju 2008-07-01 20:57:22 UTC
When fontconfig (tried versions 2.5.0-r1 and 2.6.0-r2) is compiled with gcc-4.3.1 with heavy optimizations, firefox 3 and acroread-8.1.2-r2 crash with a segmentation fault.

These are my usual CFLAGS that work with everything I've emerged so far, except fontconfig:

CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe -mfpmath=sse,387 -ffast-math -fweb -frename-registers -ftree-vectorize"

The following CFLAGS fix the problem, when used to compile fontconfig. I haven't tried all possible combinations, but instead removed flags from the right until the applications work:

Safe CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe  -mfpmath=sse,387"

Firefox versions affected include the recent nightly builds, mozilla-firefox-bin-3.0, mozilla-firefox-3.0-r1 with and without xulrunner.

This looks like bug #135632. However, previously I had compiled fontconfig-2.5.0-r1 with gcc-4.2.4 and the "heavy" CFLAGS above, with no problems. So this is probably specific to gcc-4.3.1.

The emerge --info is from a Pentium M 725 machine, but the problem also applies to my other machine with a Core Duo T2300.
Comment 1 Risto A. Paju 2008-07-01 20:57:52 UTC
Created attachment 159157 [details]
emerge --info
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2008-07-01 21:15:40 UTC
ffastmath is broken, please don't use it. Closing WONTFIX, since the bug is not on our end.
Comment 3 Risto A. Paju 2008-07-01 22:32:57 UTC
I think the solution is to filter out the CFLAG in the ebuild. -ffast-math has worked for me with everything else, and there is an established framework for filtering CFLAGS per ebuild/arch. I'll attach the new ebuild below.
Comment 4 Risto A. Paju 2008-07-01 22:34:12 UTC
Created attachment 159173 [details]
Working ebuild that filters out -ffast-math