[MPlayer-users] Segmentation fault in ff_fdct_sse2

mslama at email.cz mslama at email.cz
Mon Mar 5 12:52:20 CET 2007


   Hi.

I get reproducibly segmentation fault when running second pass of mencoder. I have Digital Video from camera. If necessary I can try to get sample and upload it somewhere. Unfortunately it does not happen when compiled with debug info (so I suspect it is connected with optimization). I had to use -fomit-frame-pointer to be able to compile in debug mode otherwise compilation fails as I described in my previous email.)

Workaround is to either use use debug version or disable SSE2 during configuration.

Comand line:

nice -+19 mencoder all.avi -oac mp3lame -lameopts cbr:br=256 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:vmax_b_frames=2:vb_strategy=1:precmp=3:cmp=3:subcmp=3:preme=2:vqcomp=0.6:autoaspect:vbitrate=6400:turbo:vpass=1 -o out.avi
nice -+19 mencoder all.avi -oac mp3lame -lameopts cbr:br=256 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:vmax_b_frames=2:precmp=3:cmp=3:subcmp=3:preme=2:vqcomp=0.6:autoaspect:vbitrate=6400:vpass=2:psnr -o out.avi

gcc:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu3)

machine is AMD64

OS:
Linux 2.6.20-9-386 #2 Mon Feb 26 02:58:41 UTC 2007 i686 GNU/Linux

Info from gdb:
#0  0x08537267 in ff_fdct_sse2 ()
#1  0xfff3fffd in ?? ()
#2  0xfff5fff3 in ?? ()
#3  0xfff90003 in ?? ()
#4  0x00070009 in ?? ()
#5  0x00150019 in ?? ()
#6  0x000dfff9 in ?? ()
#7  0x001d0009 in ?? ()
#8  0xfff90009 in ?? ()
#9  0x0020fffd in ?? ()
#10 0xffd50003 in ?? ()
#11 0x0017ffe0 in ?? ()
#12 0xfffc001e in ?? ()
#13 0xfff0fff8 in ?? ()
#14 0x00180010 in ?? ()
#15 0xfff80010 in ?? ()
#16 0xffe0fff8 in ?? ()
#17 0x00060003 in ?? ()
#18 0x00120013 in ?? ()
#19 0x00130007 in ?? ()
#20 0x0004000f in ?? ()
#21 0x00110009 in ?? ()
#22 0x000f0011 in ?? ()
#23 0x00150017 in ?? ()
#24 0x00110003 in ?? ()
#25 0x00140014 in ?? ()
#26 0xfffe0009 in ?? ()
#27 0xfff10004 in ?? ()
#28 0xffe5ffed in ?? ()
#29 0x00000000 in ?? ()
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x8537247 to 0x8537287:
0x08537247 <ff_fdct_sse2+727>:  cmc
0x08537248 <ff_fdct_sse2+728>:  int3
0x08537249 <ff_fdct_sse2+729>:  paddd  %xmm7,%xmm3
0x0853724d <ff_fdct_sse2+733>:  paddd  %xmm2,%xmm1
0x08537251 <ff_fdct_sse2+737>:  paddd  %xmm6,%xmm3
0x08537255 <ff_fdct_sse2+741>:  paddd  %xmm6,%xmm1
0x08537259 <ff_fdct_sse2+745>:  psrad  $0x11,%xmm3
0x0853725e <ff_fdct_sse2+750>:  psrad  $0x11,%xmm1
0x08537263 <ff_fdct_sse2+755>:  packssdw %xmm3,%xmm1
0x08537267 <ff_fdct_sse2+759>:  movdqa %xmm1,(%ecx)
0x0853726b <ff_fdct_sse2+763>:  movq   0x40(%esp),%xmm2
0x08537271 <ff_fdct_sse2+769>:  movq   0x48(%esp),%xmm0
0x08537277 <ff_fdct_sse2+775>:  movdqa 0x20(%edx),%xmm3
0x0853727c <ff_fdct_sse2+780>:  movdqa 0x30(%edx),%xmm7
0x08537281 <ff_fdct_sse2+785>:  movq   %xmm2,%xmm1
0x08537285 <ff_fdct_sse2+789>:  pshuflw $0x1b,%xmm0,%xmm0
End of assembler dump.
(gdb) info all-registers
eax            0x8719720        141661984
ecx            0xbfdfe388       -1075846264
edx            0x8719520        141661472
ebx            0xbfdfe3c0       -1075846208
esp            0xbfdfe2d0       0xbfdfe2d0
ebp            0x8aaf640        0x8aaf640
esi            0xbfdfe3e0       -1075846176
edi            0xbfdfe400       -1075846144
eip            0x8537267        0x8537267 <ff_fdct_sse2+759>
eflags         0x210282 [ SF IF RF ID ]
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x8f     143
gs             0x33     51
st0            -nan(0x70009fff90003)    (raw 0xffff00070009fff90003)
st1            -nan(0x1b0013000dfffc)   (raw 0xffff001b0013000dfffc)
st2            -nan(0x1fff5ffef000b)    (raw 0xffff0001fff5ffef000b)
st3            -nan(0xffe5ffedfff10004) (raw 0xffffffe5ffedfff10004)
st4            -nan(0x5fffd00030014)    (raw 0xffff0005fffd00030014)
st5            -nan(0x4000f00130007)    (raw 0xffff0004000f00130007)
st6            -nan(0x3fffd0002000d)    (raw 0xffff0003fffd0002000d)
st7            -nan(0xfffc001e0017ffe0) (raw 0xfffffffc001e0017ffe0)
fctrl          0x37f    895
fstat          0x120    288
ftag           0xaaaa   43690
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x0}, v16_int8 = {0x20, 0x0, 0xf8, 0xff, 0xe8, 0xff, 0xf0, 0xff, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x20, 0xfff8, 0xffe8, 0xfff0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0xfff80020, 0xfff0ffe8, 0x0, 0x0}, v2_int64 = {0xfff0ffe8fff80020,
    0x0}, uint128 = 0x0000000000000000fff0ffe8fff80020}
xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0x0, 0x0, 0x1, 0x0, 0xd, 0x0, 0xfb, 0xff, 0xc, 0x0,
    0x2, 0x0, 0xff, 0xff, 0xfc, 0xff}, v8_int16 = {0x0, 0x1, 0xd, 0xfffb, 0xc, 0x2, 0xffff, 0xfffc}, v4_int32 = {0x10000, 0xfffb000d, 0x2000c, 0xfffcffff}, v2_int64 = {
    0xfffb000d00010000, 0xfffcffff0002000c}, uint128 = 0xfffcffff0002000cfffb000d00010000}
xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x8000000000000000}, v16_int8 = {0x0, 0x0, 0xf4, 0xff, 0x8, 0x3a, 0x3, 0x0, 0xb0, 0x35, 0x11, 0x0,
    0xb0, 0x18, 0xfd, 0xff}, v8_int16 = {0x0, 0xfff4, 0x3a08, 0x3, 0x35b0, 0x11, 0x18b0, 0xfffd}, v4_int32 = {0xfff40000, 0x33a08, 0x1135b0, 0xfffd18b0}, v2_int64 = {
    0x33a08fff40000, 0xfffd18b0001135b0}, uint128 = 0xfffd18b0001135b000033a08fff40000}
xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x8000000000000000}, v16_int8 = {0xc, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff,
    0xfc, 0xff, 0xff, 0xff}, v8_int16 = {0xc, 0x0, 0x2, 0x0, 0xffff, 0xffff, 0xfffc, 0xffff}, v4_int32 = {0xc, 0x2, 0xffffffff, 0xfffffffc}, v2_int64 = {0x20000000c,
    0xfffffffcffffffff}, uint128 = 0xfffffffcffffffff000000020000000c}
xmm4           {v4_float = {0x2, 0xc258c5, 0x0, 0xe90b18a0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0x0, 0x40, 0x0, 0x40, 0xc5, 0x58, 0x42,
    0x4b, 0x5d, 0xdd, 0x61, 0xac, 0x3b, 0xa7, 0xb7, 0xcd}, v8_int16 = {0x4000, 0x4000, 0x58c5, 0x4b42, 0xdd5d, 0xac61, 0xa73b, 0xcdb7}, v4_int32 = {0x40004000,
    0x4b4258c5, 0xac61dd5d, 0xcdb7a73b}, v2_int64 = {0x4b4258c540004000, 0xcdb7a73bac61dd5d}, uint128 = 0xcdb7a73bac61dd5d4b4258c540004000}
xmm5           {v4_float = {0x2, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x8000000000000000}, v16_int8 = {0x0, 0x40, 0x0, 0x40, 0x49, 0x32, 0xa8, 0x11, 0x9f, 0x53, 0xa3,
    0x22, 0x42, 0x4b, 0x58, 0xee}, v8_int16 = {0x4000, 0x4000, 0x3249, 0x11a8, 0x539f, 0x22a3, 0x4b42, 0xee58}, v4_int32 = {0x40004000, 0x11a83249, 0x22a3539f,
    0xee584b42}, v2_int64 = {0x11a8324940004000, 0xee584b4222a3539f}, uint128 = 0xee584b4222a3539f11a8324940004000}
xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0},
  v8_int16 = {0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1}, v4_int32 = {0x10000, 0x10000, 0x10000, 0x10000}, v2_int64 = {0x1000000010000, 0x1000000010000},
  uint128 = 0x00010000000100000001000000010000}
---Type <return> to continue, or q <return> to quit---
xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0x0, 0x0, 0x10, 0x0, 0x90, 0xa7, 0xfb, 0xff, 0x40,
    0x4, 0xf4, 0xff, 0x98, 0x7, 0xfa, 0xff}, v8_int16 = {0x0, 0x10, 0xa790, 0xfffb, 0x440, 0xfff4, 0x798, 0xfffa}, v4_int32 = {0x100000, 0xfffba790, 0xfff40440,
    0xfffa0798}, v2_int64 = {0xfffba79000100000, 0xfffa0798fff40440}, uint128 = 0xfffa0798fff40440fffba79000100000}
mxcsr          0x1fa0   [ PE IM DM ZM OM UM PM ]
mm0            {uint64 = 0x70009fff90003, v2_int32 = {0xfff90003, 0x70009}, v4_int16 = {0x3, 0xfff9, 0x9, 0x7}, v8_int8 = {0x3, 0x0, 0xf9, 0xff, 0x9, 0x0, 0x7, 0x0}}
mm1            {uint64 = 0x1b0013000dfffc, v2_int32 = {0xdfffc, 0x1b0013}, v4_int16 = {0xfffc, 0xd, 0x13, 0x1b}, v8_int8 = {0xfc, 0xff, 0xd, 0x0, 0x13, 0x0, 0x1b, 0x0}}
mm2            {uint64 = 0x1fff5ffef000b, v2_int32 = {0xffef000b, 0x1fff5}, v4_int16 = {0xb, 0xffef, 0xfff5, 0x1}, v8_int8 = {0xb, 0x0, 0xef, 0xff, 0xf5, 0xff, 0x1,
    0x0}}
mm3            {uint64 = 0xffe5ffedfff10004, v2_int32 = {0xfff10004, 0xffe5ffed}, v4_int16 = {0x4, 0xfff1, 0xffed, 0xffe5}, v8_int8 = {0x4, 0x0, 0xf1, 0xff, 0xed,
    0xff, 0xe5, 0xff}}
mm4            {uint64 = 0x5fffd00030014, v2_int32 = {0x30014, 0x5fffd}, v4_int16 = {0x14, 0x3, 0xfffd, 0x5}, v8_int8 = {0x14, 0x0, 0x3, 0x0, 0xfd, 0xff, 0x5, 0x0}}
mm5            {uint64 = 0x4000f00130007, v2_int32 = {0x130007, 0x4000f}, v4_int16 = {0x7, 0x13, 0xf, 0x4}, v8_int8 = {0x7, 0x0, 0x13, 0x0, 0xf, 0x0, 0x4, 0x0}}
mm6            {uint64 = 0x3fffd0002000d, v2_int32 = {0x2000d, 0x3fffd}, v4_int16 = {0xd, 0x2, 0xfffd, 0x3}, v8_int8 = {0xd, 0x0, 0x2, 0x0, 0xfd, 0xff, 0x3, 0x0}}
mm7            {uint64 = 0xfffc001e0017ffe0, v2_int32 = {0x17ffe0, 0xfffc001e}, v4_int16 = {0xffe0, 0x17, 0x1e, 0xfffc}, v8_int8 = {0xe0, 0xff, 0x17, 0x0, 0x1e, 0x0,
    0xfc, 0xff}}



More information about the MPlayer-users mailing list