[Speex-dev] Speex-1.1.7 seems to crash with --enable-sse (on P3/GCC-3.2)..

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Wed Apr 20 20:25:26 PDT 2005


Hi,

To increase the stack size, you can increase the value in the
speex_alloc() call in nb_celp.c. Let me know if it solves the problem.
Also, what compiler are you using. I think some older versions of gcc
may have problems with SSE intrinsics.

	Jean-Marc

Le mardi 19 avril 2005 à 16:02 +0200, jehan Monnier a écrit :
> Hi,
> 
> I also tried to build speex 1.1.7  with sse enabled on a RAS 3  (P4). 
> Both version 1.1.6 and 1.1.7  crash:
> 
> [root at tomb root]# speexenc -n loup.wav loup.spx
> Encoding 8000 Hz audio using narrowband mode (stereo)
> Segmentation fault (core dumped)
> 
> Stack  trace:
> Loaded symbols for /lib/ld-linux.so.2
> #0  fir_mem2_10 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160,
> ord=10, _mem=0x80568cc) at xmmintrin.h:790
> 790     {
> (gdb) bt
> #0  fir_mem2_10 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160,
> ord=10, _mem=0x80568cc) at xmmintrin.h:790
> #1  0xb75dc509 in fir_mem2 (x=0x80552a8, _num=0x80566b4, y=0x80558ac,
> N=160, ord=0, _mem=0x1) at filters_sse.h:330
> #2  0xb75d2ca7 in nb_encode (state=0x80551b0, vin=0xbfff88e0,
> bits=0xbfff9f70) at nb_celp.c:351
> #3  0xb75dd560 in speex_encode_int (state=0x80551b0, in=0xb75e9400,
> bits=0xbfff9f70) at speex.c:141
> #4  0x0804a071 in main (argc=0, argv=0xbfffafe4) at speexenc.c:688
> 
> 
> Just a question, how to increase the "encoder/decoder" the stack
> size ?
> Any other suggestion ?
> 
> Regards
> 
> 
> 
> 
>         Hi,
>         
>         First question is do you run a 2.4 kernel or later (2.2
>         doesn't support
>         SSE). Next thing to check, does 1.1.6 work? You may also want
>         to
>         increase the encoder/decoder stack size just in case. Oh, and
>         don't
>         compile with -mfpmath=sse .
>         
>         Jean-Marc
>         
>         Le mardi 08 mars 2005 à 12:02 -0500, Steve Kann a écrit :
>         > I tried building speex with SSE, and found that it crashes
>         for me here:
>         > 
>         > [This is on RH=8.0]:
>         > 
>         > # libtool gdb ./src/speexenc
>         > GNU gdb Red Hat Linux (5.2.1-4)
>         > [...]
>         > This GDB was configured as "i386-redhat-linux"...
>         > (gdb) r --rate 8000 --16bit -n /dev/zero /tmp/foo
>         > Starting program: /usr/src/speex-1.1.7/src/.libs/lt-speexenc
>         --rate 8000 
>         > --16bit -n /dev/zero /tmp/foo
>         > Encoding 8000 Hz audio using narrowband mode (mono)
>         > 
>         > Program received signal SIGSEGV, Segmentation fault.
>         > fir_mem2_10 (x=0x8054a88, _num=0x8055e94, y=0x805508c,
>         N=160, ord=10, 
>         > _mem=0x80560ac)
>         >
>         at /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/xmmintrin.h:774
>         > 774 {
>         > (gdb)
>         > (gdb) bt
>         > #0 fir_mem2_10 (x=0x8054a88, _num=0x8055e94, y=0x805508c,
>         N=160, 
>         > ord=10, _mem=0x80560ac)
>         >
>         at /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/xmmintrin.h:774
>         > #1 0x40020add in fir_mem2 (x=0x8054a88, _num=0x8055e94,
>         y=0x805508c, 
>         > N=160, ord=0, _mem=0x1) at filters_sse.h:330
>         > #2 0x40016c23 in nb_encode (state=0x8054990,
>         vin=0xbfffd420, 
>         > bits=0xbfffeaa0) at nb_celp.c:351
>         > #3 0x400215f4 in speex_encode_int (state=0x8054990,
>         in=0xbfffead0, 
>         > bits=0xbfffeaa0) at speex.c:141
>         > #4 0x0804a089 in main (argc=-80, argv=0xbffffad4) at
>         speexenc.c:688
>         > #5 0x420158d4 in __libc_start_main ()
>         from /lib/i686/libc.so.6
>         > (gdb) q
>         > The program is running. Exit anyway? (y or n) y
>         > 
>         > 
>         > If I build without sse, things are OK.
>         > 
>         > This box is running RH-8 on a PIII (katmai), which seems to
>         support sse:
>         > flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca 
>         > cmov pat pse36 mmx fxsr sse
>         > 
>         > If I compile the same thing on another box with an Athlon
>         CPU instead, 
>         > it seems to work without crashing..
>         > 
>         > I guess it's not critical in this case, but does anyone know
>         if this is 
>         > an issue with the SSE intrinsics in gcc-3.2, or is it a
>         CPU-support 
>         > issue (or something else?).
>         > 
>         > -SteveK
>         > 
>         > 
>         > _______________________________________________
>         > Speex-dev mailing list
>         > Speex-dev at xiph.org
>         > http://lists.xiph.org/mailman/listinfo/speex-dev
>         > 
>         -- 
>         Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
>         Université de Sherbrooke
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
-- 
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke



More information about the Speex-dev mailing list