[Ffmpeg-devel] Segfault when encoding MPEG with MMX support

Tobias Grimm listaccount
Sun Jul 10 23:04:40 CEST 2005


Michael Niedermayer schrieb:

>well, try to recompile libav* or just the involved files (mpegvideo_mmx*) with 
>-O1 and post the gdb output from
>
>bt
>disass $pc-32 $pc+32
>info all-registers
>  
>

Ok - I hope you know what to do with these information, I don't :-) Here
it is:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 180236 (LWP 11385)]
0x408113ce in dct_quantize_SSE2 (s=0xa32fe70, block=0xa387f90, n=0,
qscale=171292384, overflow=0xbe3f71b0)
    at mpegvideo_mmx_template.c:156
        in mpegvideo_mmx_template.c
(gdb) bt
#0  0x408113ce in dct_quantize_SSE2 (s=0xa32fe70, block=0xa387f90, n=0,
qscale=171292384, overflow=0xbe3f71b0)
    at mpegvideo_mmx_template.c:156
#1  0x405d56bb in encode_mb (s=0xa32fe70, motion_x=0, motion_y=0) at
mpegvideo.c:4237
#2  0x405d86c9 in encode_thread (c=0xa34e4c0, arg=0xa32fe70) at
mpegvideo.c:5135
#3  0x405c9d92 in avcodec_default_execute (c=0xa34e4c0, func=0x405d6569
<encode_thread>, arg=0xa32ff34, ret=0x0, count=1)
    at utils.c:423
#4  0x405d9781 in encode_picture (s=0xa32fe70, picture_number=0) at
mpegvideo.c:5446
#5  0x405d215d in MPV_encode_picture (avctx=0xa34e4c0, buf=0xa34d9f0 "",
buf_size=1244160, data=0xa34d510)
    at mpegvideo.c:2339
#6  0x405ca27e in avcodec_encode_video (avctx=0xa34e4c0, buf=0xa35b660
"\006", buf_size=1244160, pict=0xa34d510)
    at utils.c:584
#7  0x405c69b3 in cEncode::EncodeFrames (this=0xa34d6fc,
context=0xa34e4c0, frame=0xa34d510) at encode.c:194
#8  0x405c6739 in cEncode::Encode (this=0xa34d6fc) at encode.c:122
#9  0x405c7317 in cStillImage::Action (this=0xa34d6d0) at stillimage.c:89
#10 0x08122666 in cThread::StartThread (Thread=0xa34d6d0) at thread.c:233
#11 0x40041e51 in pthread_start_thread () from /lib/libpthread.so.0
#12 0x40041ecf in pthread_start_thread_event () from /lib/libpthread.so.0
#13 0x4025192a in clone () from /lib/libc.so.6
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x408113ae to 0x408113ee:
0x408113ae <dct_quantize_SSE2+560>:     add    %al,(%eax)
0x408113b0 <dct_quantize_SSE2+562>:     pxor   %mm1,%mm1
0x408113b3 <dct_quantize_SSE2+565>:     movq   (%ecx,%eax,1),%mm0
0x408113b7 <dct_quantize_SSE2+569>:     pcmpgtw %mm0,%mm1
0x408113ba <dct_quantize_SSE2+572>:     pxor   %mm1,%mm0
0x408113bd <dct_quantize_SSE2+575>:     psubw  %mm1,%mm0
0x408113c0 <dct_quantize_SSE2+578>:     movq   (%esi,%eax,1),%mm6
0x408113c4 <dct_quantize_SSE2+582>:     paddusw %mm6,%mm0
0x408113c7 <dct_quantize_SSE2+585>:     push   %eax
0x408113c8 <dct_quantize_SSE2+586>:     mov    0xffffff64(%ebp),%eax
0x408113ce <dct_quantize_SSE2+592>:     movq   (%eax,%eax,1),%mm5
0x408113d2 <dct_quantize_SSE2+596>:     pop    %eax
0x408113d3 <dct_quantize_SSE2+597>:     pmulhw %mm5,%mm0
0x408113d6 <dct_quantize_SSE2+600>:     por    %mm0,%mm4
0x408113d9 <dct_quantize_SSE2+603>:     pxor   %mm1,%mm0
0x408113dc <dct_quantize_SSE2+606>:     psubw  %mm1,%mm0
0x408113df <dct_quantize_SSE2+609>:     movq   %mm0,(%edx,%eax,1)
0x408113e3 <dct_quantize_SSE2+613>:     pcmpeqw %mm7,%mm0
0x408113e6 <dct_quantize_SSE2+616>:     movq   (%edi,%eax,1),%mm1
0x408113ea <dct_quantize_SSE2+620>:     movq   %mm7,(%ecx,%eax,1)
End of assembler dump.
(gdb) info all-registers
eax            0xa35b660        171292256
ecx            0xa388010        171474960
edx            0xbe3f7114       -1103138540
ebx            0x408ed518       1083102488
esp            0xbe3f7040       0xbe3f7040
ebp            0xbe3f712c       0xbe3f712c
esi            0xa35b6e0        171292384
edi            0x408f4240       1083130432
eip            0x408113ce       0x408113ce
eflags         0x210203 2163203
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x0      0
gs             0x0      0
st0            -nan(0x11000e000c0006)   (raw 0xffff0011000e000c0006)
st1            <invalid float value>    (raw 0xffff0000000000000000)
st2            -nan(0x1000100010001)    (raw 0xffff0001000100010001)
st3            -nan(0x1000100010001)    (raw 0xffff0001000100010001)
st4            <invalid float value>    (raw 0xffff0000000000000000)
st5            -nan(0xffffffffffffffff) (raw 0xffffffffffffffffffff)
st6            -nan(0x11000e000c0006)   (raw 0xffff0011000e000c0006)
st7            <invalid float value>    (raw 0xffff0000000000000000)
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 = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0,
0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0,
0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0,
0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0,
0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0,
0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0,
0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0,
0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0,
0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
mxcsr          0x1f80   8064
mm0            {uint64 = 0x11000e000c0006, v2_int32 = {0xc0006,
0x11000e}, v4_int16 = {0x6, 0xc, 0xe, 0x11}, v8_int8 = {
    0x6, 0x0, 0xc, 0x0, 0xe, 0x0, 0x11, 0x0}}
mm1            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0}}
mm2            {uint64 = 0x1000100010001, v2_int32 = {0x10001, 0x10001},
v4_int16 = {0x1, 0x1, 0x1, 0x1}, v8_int8 = {0x1,
    0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0}}
mm3            {uint64 = 0x1000100010001, v2_int32 = {0x10001, 0x10001},
v4_int16 = {0x1, 0x1, 0x1, 0x1}, v8_int8 = {0x1,
    0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0}}
mm4            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0}}
mm5            {uint64 = 0xffffffffffffffff, v2_int32 = {0xffffffff,
0xffffffff}, v4_int16 = {0xffff, 0xffff, 0xffff,
    0xffff}, v8_int8 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}
mm6            {uint64 = 0x11000e000c0006, v2_int32 = {0xc0006,
0x11000e}, v4_int16 = {0x6, 0xc, 0xe, 0x11}, v8_int8 = {
    0x6, 0x0, 0xc, 0x0, 0xe, 0x0, 0x11, 0x0}}
mm7            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0}}


Tobias





More information about the ffmpeg-devel mailing list