Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 401723 - media-libs/libaacplus USE=fftw causes segmentation faults - ?
Summary: media-libs/libaacplus USE=fftw causes segmentation faults - ?
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL: http://ffmpeg.org/trac/ffmpeg/ticket/943
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-01 00:22 UTC by Reuben Martin
Modified: 2022-09-18 21:34 UTC (History)
1 user (show)

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


Attachments
Ebuild Info (emerge-info.txt,6.26 KB, text/plain)
2012-02-01 17:08 UTC, Reuben Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Martin 2012-02-01 00:22:44 UTC
libaacplus segfaults when using fftw when fftw is built with SSE(2) SIMD options enabled due to alignment issues.

libaacplus does work when fftw is built without SSE(2) options enabled, but at that point there is no benefit gained in using fftw over the built-in FFT code.

This also causes ffmpeg to segfault when it tries to use the lib for aac+ encoding.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-01 15:09:57 UTC
1) Please post your `emerge --info media-libs/libaacplus' output in a comment.
2) Please post the failing command line and its output too.
Comment 2 Reuben Martin 2012-02-01 17:08:31 UTC
Created attachment 300681 [details]
Ebuild Info

Emerge info attached. (currently with fftw USE option turned off)
Comment 3 Reuben Martin 2012-02-01 17:14:37 UTC
With FFTW option turned off:

===========

$ ffmpeg -i test.wav -acodec libaacplus -ab 64k -f mp4 test.m4a
ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 30 2012 12:09:12 with gcc 4.5.3
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -march=native -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -pipe -fprefetch-loop-arrays -floop-block -floop-strip-mine -floop-interchange' --extra-cflags='-O2 -march=native -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -pipe -fprefetch-loop-arrays -floop-block -floop-strip-mine -floop-interchange' --extra-cxxflags='-O2 -march=native -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -pipe -fprefetch-loop-arrays -floop-block -floop-strip-mine -floop-interchange -fvisibility-inlines-hidden' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --enable-openssl --enable-nonfree --enable-gnutls --enable-libmp3lame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libtheora --enable-libvorbis --enable-libx2  libavutil      51. 34.101 / 51. 34.101
  libavcodec     53. 60.100 / 53. 60.100
  libavformat    53. 31.100 / 53. 31.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 60.100 /  2. 60.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
[wav @ 0x1c9cc70] max_analyze_duration 5000000 reached at 5015510
Input #0, wav, from 'test.wav':
  Duration: 00:03:23.22, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
Output #0, mp4, to 'test.m4a':
  Metadata:
    encoder         : Lavf53.31.100
    Stream #0:0: Audio: aac (@[0][0][0] / 0x0040), 44100 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> libaacplus)
Press [q] to stop, [?] for help
size=    1606kB time=00:03:23.22 bitrate=  64.7kbits/s    
video:0kB audio:1588kB global headers:0kB muxing overhead 1.123113%


===========

With FFTW option turned on:

===========

$ ffmpeg -i test.wav -acodec libaacplus -ab 64k -f mp4 test2.m4a
ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 30 2012 12:09:12 with gcc 4.5.3
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -march=native -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -pipe -fprefetch-loop-arrays -floop-block -floop-strip-mine -floop-interchange' --extra-cflags='-O2 -march=native -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -pipe -fprefetch-loop-arrays -floop-block -floop-strip-mine -floop-interchange' --extra-cxxflags='-O2 -march=native -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -pipe -fprefetch-loop-arrays -floop-block -floop-strip-mine -floop-interchange -fvisibility-inlines-hidden' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --enable-openssl --enable-nonfree --enable-gnutls --enable-libmp3lame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libtheora --enable-libvorbis --enable-libx2  libavutil      51. 34.101 / 51. 34.101
  libavcodec     53. 60.100 / 53. 60.100
  libavformat    53. 31.100 / 53. 31.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 60.100 /  2. 60.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
[wav @ 0x19f6c70] max_analyze_duration 5000000 reached at 5015510
Input #0, wav, from 'test.wav':
  Duration: 00:03:23.22, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
Output #0, mp4, to 'test2.m4a':
  Metadata:
    encoder         : Lavf53.31.100
    Stream #0:0: Audio: aac (@[0][0][0] / 0x0040), 44100 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> libaacplus)
Press [q] to stop, [?] for help
Segmentation fault
Comment 4 Reuben Martin 2012-02-01 17:18:24 UTC
The bug referenced in the URL given in the original report includes a gdb trace with the relevant debug into turned on, in case you want an example showing the segfault taking place in the FFTW3 lib.