Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147020 - [4.1/bad-code] gcc built with -Os makes apps segfault when built with -ffast-math
Summary: [4.1/bad-code] gcc built with -Os makes apps segfault when built with -ffast-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR28621
Whiteboard:
Keywords:
: 150214 153703 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-09 22:09 UTC by Mike Lundy
Modified: 2006-11-01 13:18 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lundy 2006-09-09 22:09:43 UTC
I am using the stage3 x86 uclibc 2006.1 release, in a chroot env (thus the slightly odd emerge --info). ps and top segfault out of the box. Googling around, I found the site referenced in the URL which explains the problem.

Summary from the URL:
If you have a x86 gcc-4.1.x, that has been built with -Os (which is the default with uclibc for example) and build an application with -ffast-math, this application will fail with a segmentation fault on a system that has SSE and fxsave support (=> fxsr and sse in /proc/cpuinfo).

Portage 2.1-r2 (uclibc/x86/2005.1, gcc-4.1.1, uclibc-0.9.28-r0, 2.6.17-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.17-gentoo-r7 x86_64 AMD Opteron(tm) Processor 152
Gentoo Base System version 1.12.4
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-gentoo-linux-uclibc"
CFLAGS="-Os -pipe"
CHOST="i386-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-z,relro"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 bitmap-fonts cli dlloader dri ncurses pcre readline reflection session spl truetype-fonts type1-fonts uclibc xorg zlib elibc_uclibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_dummy video_cards_fbdev video_cards_v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2006-09-09 23:50:02 UTC
hrm, those stages shouldnt have been released because ps was segfaulting and hadnt debugged it yet
Comment 3 SpanKY gentoo-dev 2006-09-13 23:16:34 UTC
will be fixed in 4.1.1-r2+
Comment 4 SpanKY gentoo-dev 2006-10-06 08:50:52 UTC
*** Bug 150214 has been marked as a duplicate of this bug. ***
Comment 5 Edoardo Liverani 2006-10-22 06:24:04 UTC
For they who can't wait, in order to emerge a working procps, for the moment, i suggest to do this:

CFLAGS="-fno-fast-math" CXXFLAGS="${CFLAGS}" emerge -av1 procps
Comment 6 SpanKY gentoo-dev 2006-11-01 13:18:41 UTC
*** Bug 153703 has been marked as a duplicate of this bug. ***