id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,blockedby,blocking,reproduced,analyzed
1844,Audio resampling asm crashes on windows,thegeek,,"'''Summary of the bug:'''

I get a segmentation fault when trying to join two video files.
My ffmpeg is built using my own cross-compiling toolchain. The toolchain itself was built with the mxe cross-development project.
I've updated the components in the toolchain to the latest version (e.g. gcc/mingw-w64 4.7.2).

I can reproduce the crash with git master as well as version 1.0, but only when I do the compile with my own cross-compiling toolchain, and only when I have asm enabled. If I compile with --disable-asm I can not reproduce.
I can not reproduce it with e.g. Zeranoe's win32 builds.

'''How to reproduce:'''

Unfortunately I can not give a repro case for any precompiled binaries that are publicly available, but I can probably upload the binaries I've compiled if anyone needs them.

I can reproduce the crash very reliably with my own binaries, here is the full command line I'm using:
{{{
% ffmpeg -i ..\..\Introduction_a.mkv -i ..\..\lesson.wmv -filter_complex ""[1:1] setsar=1:1 [lv]; [0:0] [0:1] [lv] [1:0] concat=n=2:v=1:a=1 [a] [v]"" -map ""[a]"" -map ""[v]"" -vcodec mpeg4 -v:q 7 output.mkv
ffmpeg version N-45928-g8b03cd3 Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 24 2012 12:18:03 with gcc 4.7.2 (GCC)
  configuration: --cross-prefix=/home/swingcatalyst/mxe/build-ffmpeg/../../mxe/mxe-multitarget-static/usr/bin/x86_64-static-mingw32- --enable-cross-compile --arch=x86_64 --target-os=mingw32 --prefix=/home/swingcatalyst/mxe/build-ffmpeg/install/ffmpeg-git-x86_64-shared-install --disable-static --enable-shared --disable-postproc --disable-pthreads --enable-runtime-cpudetect --enable-bzlib --enable-libfreetype --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-zlib --disable-stripping
  libavutil      52.  0.100 / 52.  0.100
  libavcodec     54. 68.100 / 54. 68.100
  libavformat    54. 34.100 / 54. 34.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 20.105 /  3. 20.105
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 16.100 /  0. 16.100
Input #0, matroska,webm, from '..\..\Introduction_a.mkv':
  Metadata:
    ENCODER         : Lavf54.29.104
  Duration: 00:00:06.29, start: 0.000000, bitrate: 2678 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 1920x1200 [SAR 1:1 DAR 8:5], 24 fps, 24 tbr, 1k tbn, 24 tbc (default)
    Stream #0:1: Audio: mp3, 44100 Hz, mono, s16, 64 kb/s (default)
[wmv3 @ 00000000019DDD40] Extra data: 8 bits left, value: 20
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, asf, from '..\..\lesson.wmv':
  Metadata:
    WMFSDKVersion   : 12.0.9200.16384
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
  Duration: 00:00:24.03, start: 0.000000, bitrate: 1713 kb/s
    Stream #1:0(nor): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, fltp, 96 kb/s
    Stream #1:1(nor): Video: wmv3 (Simple) (WMV3 / 0x33564D57), yuv420p, 1920x1200, 2000 kb/s, 7 tbr, 1k tbn, 1k tbc
[Parsed_setsar_0 @ 0000000003570A00] num:den syntax is deprecated, please use num/den or named options instead
File 'output.mkv' already exists. Overwrite ? [y/N] y
}}}

'''Debug info'''

I used my cross-compiling mingw toolchain to build gdb, with it I can get the following backtrace at the time of the segmentation fault:
{{{
% C:\WORK\ffmpeg\ffmpeg-git-x86_64-shared-install\bin>C:\WORK\ffmpeg\gdb.exe --args ffmpeg -i ..\..\Introduction_a.mkv -i ..\..\lesson.wmv -filter_complex ""[1:1] setsar=1:1 [lv]; [0:0] [0:1] [lv] [1:0] concat=n=2:v=1:a=1 [a] [v]"" -map ""[a]"" -map ""[v]"" -vcodec mpeg4 -q:v 7 output.mkv""
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type ""show copying""
and ""show warranty"" for details.
This GDB was configured as ""x86_64-static-mingw32"".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\WORK\ffmpeg\ffmpeg-git-x86_64-shared-install\bin\ffmpeg.exe...done.
(gdb) run
Starting program: C:\WORK\ffmpeg\ffmpeg-git-x86_64-shared-install\bin\ffmpeg.exe -i ..\..\Introduction_a.mkv -i ..\..\lesson.wmv -filter_complex ""[1:1] setsar=1:1 [lv]; [0:0] [0:1]
 [lv] [1:0] concat=n=2:v=1:a=1 [a] [v]"" -map ""[a]"" -map ""[v]"" -vcodec mpeg4 -q:v 7 output.mkv
[New Thread 10656.0x2b18]
ffmpeg version N-45928-g8b03cd3 Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 24 2012 12:18:03 with gcc 4.7.2 (GCC)
  configuration: --cross-prefix=/home/swingcatalyst/mxe/build-ffmpeg/../../mxe/mxe-multitarget-static/usr/bin/x86_64-static-mingw32- --enable-cross-compile --arch=x86_64 --target-os=mingw32 --prefix=/home/swingcatalyst/mxe/build-ffmpeg/install/ffmpeg-git-x86_64-shared-install --disable-static --enable-shared --disable-postproc --disable-pthreads --enable-runtime-cpudetect --enable-bzlib --enable-libfreetype --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-zlib --disable-stripping
  libavutil      52.  0.100 / 52.  0.100
  libavcodec     54. 68.100 / 54. 68.100
  libavformat    54. 34.100 / 54. 34.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 20.105 /  3. 20.105
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 16.100 /  0. 16.100
Input #0, matroska,webm, from '..\..\Introduction_a.mkv':
  Metadata:
    ENCODER         : Lavf54.29.104
  Duration: 00:00:06.29, start: 0.000000, bitrate: 2678 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 1920x1200 [SAR 1:1 DAR 8:5], 24 fps, 24 tbr, 1k tbn, 24 tbc (default)
    Stream #0:1: Audio: mp3, 44100 Hz, mono, s16, 64 kb/s (default)
[wmv3 @ 00000000019DDD40] Extra data: 8 bits left, value: 20
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, asf, from '..\..\lesson.wmv':
  Metadata:
    WMFSDKVersion   : 12.0.9200.16384
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
  Duration: 00:00:24.03, start: 0.000000, bitrate: 1713 kb/s
    Stream #1:0(nor): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, fltp, 96 kb/s
    Stream #1:1(nor): Video: wmv3 (Simple) (WMV3 / 0x33564D57), yuv420p, 1920x1200, 2000 kb/s, 7 tbr, 1k tbn, 1k tbc
[Parsed_setsar_0 @ 0000000003570A00] num:den syntax is deprecated, please use num/den or named options instead
File 'output.mkv' already exists. Overwrite ? [y/N] y
[New Thread 10656.0x24]
[New Thread 10656.0xc98]
[New Thread 10656.0x1c84]
[New Thread 10656.0x23a8]
[New Thread 10656.0x28c0]
[New Thread 10656.0x2604]
[New Thread 10656.0x2318]
[New Thread 10656.0x1a98]
[New Thread 10656.0x144c]
[New Thread 10656.0x21e8]
Extra data: 8 bits left, value: 20
Output #0, matroska, to 'output.mkv':
  Metadata:
    encoder         : Lavf54.34.100
    Stream #0:0: Video: mpeg4, yuv420p, 1920x1200 [SAR 1:1 DAR 8:5], q=2-31, 200 kb/s, 1k tbn, 24 tbc
    Stream #0:1: Audio: vorbis, 44100 Hz, mono, fltp
Stream mapping:
  Stream #0:0 (mpeg4) -> concat:in0:v0
  Stream #0:1 (mp3) -> concat:in0:a0
  Stream #1:0 (wmav2) -> concat:in1:a0
  Stream #1:1 (wmv3) -> setsar
  concat:out:v0 -> Stream #0:0 (mpeg4)
  concat:out:a0 -> Stream #0:1 (libvorbis)
Press [q] to stop, [?] for help
100 buffers queued in output stream 0:1, something may be wrong.te= 871.8kbits/s

Program received signal SIGSEGV, Segmentation fault.
0x00000000707cd0e8 in ff_mix_2_1_a_float_avx () from C:\WORK\ffmpeg\ffmpeg-git-x86_64-shared-install\bin\swresample-0.dll
(gdb) backtrace
#0  0x00000000707cd0e8 in ff_mix_2_1_a_float_avx () from C:\WORK\ffmpeg\ffmpeg-git-x86_64-shared-install\bin\swresample-0.dll
#1  0x00000000707c4147 in swri_rematrix (s=s@entry=0x3168b80, out=out@entry=0x23de00, in=in@entry=0x3168c30, len=len@entry=8192,
}}}",defect,closed,normal,swresample,git-master,fixed,win64 crash SIGSEGV,,,,0,0
