Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136135 - [4.1/wrong-code] -ftree-vectorize breaks faac
Summary: [4.1/wrong-code] -ftree-vectorize breaks faac
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-08 19:08 UTC by Bret Towe
Modified: 2009-04-20 17:13 UTC (History)
1 user (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 Bret Towe 2006-06-08 19:08:15 UTC
with -ftree-vectorize in cflags i found that faac when told to encode
a wave file it would seg fault as soon as it would start


Portage 2.1_rc4-r4 (default-linux/amd64/2005.0, gcc-4.1.1, glibc-2.3.6-r3, 2.6.17-rc4-git10 x86_64)
=================================================================
System uname: 2.6.17-rc4-git10 x86_64 AMD Athlon(tm) 64 Processor 2800+
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
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-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O3 -pipe -fweb -ftracer -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /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/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O3 -pipe -fweb -ftracer -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages metadata-transfer nostrip parallel-fetch sandbox sfperms userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
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"
PORTDIR_OVERLAY="/mdhd/portage.local"
SYNC="rsync://vox.net/gentoo-portage"
USE="amd64 X a52 aac alsa avi berkdb bitmap-fonts bzip2 cairo canna cdda cddb cdr cjk cli crypt cups dbus dri dts dv dvb dvd dvdread eds emboss encode esd fam fbcon fbdev firefox fits flac foomaticdb geos glitz gml gnome gstreamer gtk gtk2 gtkhtml hdf hdf5 imagemagick imlib ipv6 isdnlog jpeg kde live lzw lzw-tiff mad matroska mng mp3 mp4 mpeg musepack ncurses netcdf nls nptl nptlonly ogg oggvorbis opengl pam pcre pda pdf pdflib perl png pppd python qt quicktime readline reflection rtsp sdl session speex spell spl ssl stream svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales v4l v4l2 vcd vorbis wmf x264 xine xml xml2 xmms xorg xpm xv xvmc zlib elibc_glibc input_devices_mouse input_devices_keyboard kernel_linux userland_GNU video_cards_radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2006-10-21 18:41:54 UTC
confirmed on x86


gcc-4.1.1-r1:

Freeware Advanced Audio Coder
FAAC 1.24

Quantization quality: 100
Bandwidth: 16000 Hz
Object type: Low Complexity(MPEG-2) + TNS + M/S
File format: MPEG-2 AAC (ADTS)
Encoding 8.WAV to test
   frame          | bitrate | elapsed/estim | play/CPU | ETA
Segmentation fault


4.2-svn gets a bit further:

Freeware Advanced Audio Coder
FAAC 1.24

Quantization quality: 100
Bandwidth: 16000 Hz
Object type: Low Complexity(MPEG-2) + TNS + M/S
File format: MPEG-2 AAC (ADTS)
Encoding 8.WAV to test
   frame          | bitrate | elapsed/estim | play/CPU | ETA
 1200/1218  ( 98%)|   90.0  |    0.9/0.9    |   30.23x | 0.0 Segmentation fault


the faac file does get created but sounds like white noise when played.


Portage 2.1.2_pre3-r6 (default-linux/x86/2006.1/desktop, gcc-pre20061020, glibc-2.5-r0, 2.6.18.1 i686)
=================================================================
System uname: 2.6.18.1 i686 Genuine Intel(R) CPU           T2300  @ 1.66GHz
Gentoo Base System version 1.12.5
Last Sync: Sat, 21 Oct 2006 17:00:01 +0000
ccache version 2.4 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
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.17, 2.17.50.0.5, 2.17.50.0.6
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -fomit-frame-pointer -pipe -ftree-vectorize"
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/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=prescott -fomit-frame-pointer -pipe -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests autoconfig buildsyspkg ccache digest distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms splitdebug strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.chem.wisc.edu/gentoo/"
LANG="en_CA.UTF-8"
LC_ALL="en_CA.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS=""
MAKEOPTS="-j5"
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"
PORTDIR_OVERLAY="/home/dirtyepic/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acpi alsa bash-completion berkdb bzip2 caps cdparanoia cdr crypt cscope curl dri dts dvd dvdr dvdread elibc_glibc encode exif expat fam ffmpeg fftw flac gdbm gif gmp gnutls gtk hal imap imlib input_devices_joystick input_devices_keyboard input_devices_mouse input_devices_synaptics java jikes jpeg kde kdeenablefinal kdehiddenvisibility kernel_linux lm_sensors mad mbox mmap mmx mp3 mpeg ncurses nptl nsplugin ogg opengl oss pam pcmcia pdf perl pic png python qt3 qt4 quicktime readline ruby sdl session sndfile spell sqlite sse sse2 ssl startup-notification svg tcpd theora threads truetype unicode urandom usb userland_GNU vcd video_cards_fglrx video_cards_radeon vorbis win32codecs wxwindows xine xml xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS

Comment 2 SpanKY gentoo-dev 2006-10-21 18:59:24 UTC
need to narrow down the bad the code and submit it upstream
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2006-10-21 21:17:56 UTC
don't know if this can help:

$ gdb faac
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) set args -o bug136135.aac Sh_Fem\ Spoken\ 14.wav
(gdb) run
Starting program: /usr/bin/faac -o bug136135.aac Sh_Fem\ Spoken\ 14.wav
Freeware Advanced Audio Coder
FAAC 1.24

Quantization quality: 100
Bandwidth: 16000 Hz
Object type: Low Complexity(MPEG-2) + TNS + M/S
File format: MPEG-2 AAC (ADTS)
Encoding Sh_Fem Spoken 14.wav to bug136135.aac
   frame          | bitrate | elapsed/estim | play/CPU | ETA

Program received signal SIGSEGV, Segmentation fault.
0xb7f0fd81 in TnsEncode (tnsInfo=0xb7346078, numberOfBands=32, maxSfb=49, blockType=LONG_SHORT_WINDOW, sfbOffsetTable=0xb7345a74,
    spec=0x8061398) at tns.c:606
606     tns.c: No such file or directory.
        in tns.c
(gdb) bt
#0  0xb7f0fd81 in TnsEncode (tnsInfo=0xb7346078, numberOfBands=32, maxSfb=49, blockType=LONG_SHORT_WINDOW, sfbOffsetTable=0xb7345a74,
    spec=0x8061398) at tns.c:606
#1  0xb7f0733c in faacEncEncode (hEncoder=0xb7345008, inputBuffer=0x80c5c68, samplesInput=2048, outputBuffer=0x80c7c70 "",
    bufferSize=1536) at frame.c:664
#2  0x0804a32d in main (argc=1, argv=Cannot access memory at address 0x4
) at main.c:1006
#3  0x4e8d0f93 in __libc_start_main () from /lib/libc.so.6


also i was wrong, gcc-4.2 works perfectly fine.  must've had a bad .wav file.
Comment 4 Mark Loeser (RETIRED) gentoo-dev 2007-11-04 01:45:28 UTC
Looks okay for me on 4.1.2.  Can one of you please verify that?
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2007-11-05 01:20:21 UTC
gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)

works, though someone stuck a filter-flags in the faac ebuild.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2009-04-20 17:13:43 UTC
Newest version of faac doesn't have the filter-flags, and it looks like it works fine with gcc-4.3