Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131332 - [4.1/ICE] speex 1.1.12 segfaults gcc-4.1.0 with -ftree-loop-linear -O1
Summary: [4.1/ICE] speex 1.1.12 segfaults gcc-4.1.0 with -ftree-loop-linear -O1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR23820
Whiteboard:
Keywords:
: 146011 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-26 06:02 UTC by Lukasz Ligowski
Modified: 2007-11-05 17:41 UTC (History)
2 users (show)

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


Attachments
compiler preprocessed sources (cccYJ7fw.out,4.68 KB, text/plain)
2006-04-26 06:04 UTC, Lukasz Ligowski
Details
gcc-4.1-speex-ICE.c (gcc-4.1-speex-ICE.c,252 bytes, text/plain)
2006-04-28 17:09 UTC, SpanKY
Details
Another test case, using ARTS. (arts-sigsev.c,479.90 KB, text/x-csrc)
2006-06-05 18:50 UTC, Piojo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Ligowski 2006-04-26 06:02:20 UTC
speex segfaulted gcc 

if /bin/sh ../libtool --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -I.. -I/usr/include    -march=k8 -mtune=athlon64 -O2 -pipe -ftree-loop-linear -MT high_lsp_tables.lo -MD -MP -MF ".deps/high_lsp_tables.Tpo" -c -o high_lsp_tables.lo high_lsp_tables.c; \
then mv -f ".deps/high_lsp_tables.Tpo" ".deps/high_lsp_tables.Plo"; else rm -f ".deps/high_lsp_tables.Tpo"; exit 1; fi                                                               x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -I.. -I/usr/include -march=k8 -mtune=athlon64 -O2 -pipe -ftree-loop-linear -MT vq.lo -MD -MP -MF .de
ps/vq.Tpo -c vq.c  -fPIC -DPIC -o .libs/vq.o                                                                                                                                        vq.c: In function 'vq_index':
vq.c:75: internal compiler error: Segmentation fault                                                                                                                                Please submit a full bug report,
with preprocessed source if appropriate.                                                                                                                                            See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /var/tmp/portage/speex-1.1.12/temp/cccYJ7fw.out file, please attach this to your bugreport.                                                         make[2]: *** [vq.lo] Error 1
make[2]: *** Waiting for unfinished jobs....                                                                                                                                        

so I looked at this file and tried co compile this function alone, it compiles with -O2 -pipe and with -ftree-loop-linear but with both

Portage 2.0.54 (default-linux/amd64/2006.0, gcc-4.1.0, glibc-2.4-r1, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64 AMD Turion(tm) 64 Mobile Technology ML-28
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
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-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -mtune=athlon64 -O2 -pipe -fprefetch-loop-arrays -DNDEBUG -DG_DISABLE_ASSERT -ftree-loop-linear -ftracer -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -mtune=athlon64 -O2 -pipe -fprefetch-loop-arrays -DNDEBUG -DG_DISABLE_ASSERT -ftree-loop-linear -ftracer -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://pandemonium.tiscali.de/pub/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://mirror.gentoo.no/ "
LANG="pl_PL@euro"
LC_ALL="pl_PL.UTF-8"
LINGUAS="pl en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac aalib acl acpi alsa apache2 audiofile avi bash-completion bitmap-fonts blas bzip2 cairo cdparanoia cdr cli crypt cscope cups curl divx4linux doc dri dts dvd dvdr dvdread eds emboss emul-linux-x86 encode ethereal examples exif expat fam fastcgi ffmpeg fftw flac foomaticdb fortran freetype gd gdbm ggi gif glut gmp gpm gstreamer gtk2 guile hal iconv idn imagemagick imap imlib ipv6 isdnlog jabber java jpeg kde kdeenablefinal lapack lcms libcaca libwww lm_sensors lzw lzw-tiff mad memlimit mime mmap mng mp3 mpeg mpi nas ncurses netcdf nls nptl nptlonly odbc ogg opengl pcmcia pcre pdf pdflib perl php pic plotutils png posix postgres pppd python qt quicktime readline reflection ruby samba sasl sdl session slang slp source speex spell spl sqlite ssl svg tcpd tetex theora tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd vorbis wifi wmf xcomposite xine xinerama xml xml2 xorg xpm xv xvid zlib linguas_pl linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LDFLAGS
Comment 1 Lukasz Ligowski 2006-04-26 06:04:04 UTC
Created attachment 85534 [details]
compiler preprocessed sources
Comment 2 SpanKY gentoo-dev 2006-04-28 17:09:31 UTC
fails with 4.1 and 4.2
Comment 3 SpanKY gentoo-dev 2006-04-28 17:09:35 UTC
Created attachment 85713 [details]
gcc-4.1-speex-ICE.c
Comment 4 Piojo 2006-06-05 18:50:55 UTC
Created attachment 88491 [details]
Another test case, using ARTS.

I found the same bug, on 4.1.1. This time, the package that ICEs is Arts.

The softest compilation options I found that reproduce it are:

gcc -O2 -c -ftree-loop-linear arts-sigsev.c

Using -O1 instead compiles all right. Disabling -ftree-loop-linear compiles all right too, with -O3 and very agressive CFLAGS. I suppose -O1 doesn't turn on some optimization required for tree-loop-linear.
My emerge info:

--
Portage 2.1_rc3-r3 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r8 i686)
=================================================================
System uname: 2.6.16-gentoo-r8 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.12.0
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
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.18.1
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-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -maccumulate-outgoing-args -fprefetch-loop-arrays -ftree-vectorize -ftree-loop-linear -ftree-loop-im"
CHOST="i686-pc-linux-gnu"
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/conf.d/net /etc/conf.d/rc /etc/fstab /etc/gconf /etc/locales.build /etc/make.conf /etc/modules.autoload.d/kernel-2.6 /etc/rc.conf /etc/revdep-rebuild /etc/services /etc/sudoers /etc/terminfo /etc/texmf/web2c /usr/kde/3.5/share/config/kdm/kdmrc /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -maccumulate-outgoing-args -fprefetch-loop-arrays -ftree-vectorize -ftree-loop-linear -ftree-loop-im -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://213.186.33.38/gentoo-distfiles/ ftp://213.186.33.37/gentoo-distfiles/ http://213.186.33.38/gentoo-distfiles/ http://213.186.33.37/gentoo-distfiles/ http://ftp.heanet.ie/pub/gentoo/ http://linuv.uv.es/mirror/gentoo/"
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s"
LINGUAS="es"
MAKEOPTS="-j2"
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="/home/portagetmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X aac alsa apache2 apm arts asf audiofile avi bash-completion berkdb bitmap-fonts blas bootsplash browserplugin bzip2 cdparanoia cli crypt cups dri dvd emacs encode fam ffmpeg flac foomaticdb fortran gd gdbm gif gimp gimpprint gmail gtk gtk2 hal idn imagemagick imlib input_devices_keyboard input_devices_mouse isdnlog java jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility lapack lcms libg++ libwww mad mikmod mmx mmx2 mmxext mng motif moznocompose moznoirc moznomail mp3 mpeg mplayer ncurses nls no-old-linux nptl nptlonly nsplugin nvidia ogg opengl pam pcre pdf pdflib perl png postgres pppd python qt quicktime readline reflection rtc scanner sdl sensord session spell spl sse ssl svg svga tcpd tetex theora tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales video_cards_nvidia vorbis win32codecs xcomposite xine xorg xv xvid zlib elibc_glibc kernel_linux linguas_es userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-09-02 10:35:47 UTC
*** Bug 146011 has been marked as a duplicate of this bug. ***
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2007-11-03 21:27:41 UTC
4.1.2 and 4.2.2 both seem to work.  Can someone else please verify this as well?
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2007-11-05 00:54:21 UTC
gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)
gcc version 4.2.2 (Gentoo 4.2.2 p1.0)

these both work.
Comment 8 Mark Loeser (RETIRED) gentoo-dev 2007-11-05 17:41:10 UTC
4.1.2 is stable, so this should be fixed now.