[x264-devel] Segfault in x264

Jonathan Tellier jonathan.tellier at gmail.com
Fri Jun 12 22:09:26 CEST 2009


Hello there,
I encountered a bug in the Empathy instant messenger client and I believe that it's related to x264. If it turns out that the problem is elsewhere, sorry to bother you.

What I was trying to accomplish:
Make an Empathy video call using h264 codecs.

The problem I encountered:
A segfault in libx264.

Just tell me if you need other information or if I should just post this elsewhere.


(gdb) bt
#0  0x00007f44b84ecdc0 in x264_slicetype_analyse () from /usr/lib/libx264.so.67
#1  0x00007f44b84ed4f5 in x264_slicetype_decide () from /usr/lib/libx264.so.67
#2  0x00007f44b8528cd6 in x264_encoder_encode () from /usr/lib/libx264.so.67
#3  0x00007f44b875ef41 in gst_x264_enc_encode_frame () from /usr/lib/gstreamer-0.10/libgstx264.so
#4  0x00007f44b876032e in gst_x264_enc_chain () from /usr/lib/gstreamer-0.10/libgstx264.so
#5  0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#6  0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#7  0x00007f44d8d40ac8 in gst_base_transform_chain () from /usr/lib/libgstbase-0.10.so.0
#8  0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#9  0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#10 0x00007f44d8d40ac8 in gst_base_transform_chain () from /usr/lib/libgstbase-0.10.so.0
#11 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#12 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#13 0x00007f44d8d40ac8 in gst_base_transform_chain () from /usr/lib/libgstbase-0.10.so.0
#14 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#15 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#16 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#17 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#18 0x00007f44c3afd01f in gst_valve_chain () from /usr/lib/gstreamer-0.10/libgstvalve.so
#19 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#20 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#21 0x00007f44c56b9f11 in gst_tee_handle_buffer () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#22 0x00007f44c56ba1ea in gst_tee_chain () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#23 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#24 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#25 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#26 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#27 0x00007f44c56b9f11 in gst_tee_handle_buffer () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#28 0x00007f44c56ba1ea in gst_tee_chain () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#29 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
---Type <return> to continue, or q <return> to quit---
#30 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#31 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#32 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#33 0x00007f44d8d40ac8 in gst_base_transform_chain () from /usr/lib/libgstbase-0.10.so.0
#34 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#35 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#36 0x00007f44d8d40ac8 in gst_base_transform_chain () from /usr/lib/libgstbase-0.10.so.0
#37 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#38 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#39 0x00007f44d8d40ac8 in gst_base_transform_chain () from /usr/lib/libgstbase-0.10.so.0
#40 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#41 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#42 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#43 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#44 0x00007f44d52b8448 in gst_pad_chain_unchecked () from /usr/lib/libgstreamer-0.10.so.0
#45 0x00007f44d52b9723 in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#46 0x00007f44d8d38dcb in gst_base_src_loop () from /usr/lib/libgstbase-0.10.so.0
#47 0x00007f44d52da927 in gst_task_func () from /usr/lib/libgstreamer-0.10.so.0
#48 0x00007f44d14c8f52 in g_thread_pool_thread_proxy () from /usr/lib/libglib-2.0.so.0
#49 0x00007f44d14c7954 in g_thread_create_proxy () from /usr/lib/libglib-2.0.so.0
#50 0x00007f44d124f59a in start_thread () from /lib/libpthread.so.0
#51 0x00007f44d0fc0c3d in clone () from /lib/libc.so.6
#52 0x0000000000000000 in ?? ()

(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x7f44b84ecda0 to 0x7f44b84ecde0:
0x00007f44b84ecda0 <x264_slicetype_analyse+768>:        pop    %rsp
0x00007f44b84ecda1 <x264_slicetype_analyse+769>:        sti
0x00007f44b84ecda2 <x264_slicetype_analyse+770>:        (bad)
0x00007f44b84ecda3 <x264_slicetype_analyse+771>:        incl   -0x347bf040(%rbp)
0x00007f44b84ecda9 <x264_slicetype_analyse+777>:        (bad)
0x00007f44b84ecdaa <x264_slicetype_analyse+778>:        (bad)
0x00007f44b84ecdab <x264_slicetype_analyse+779>:        ljmpq  *<internal disassembler error>
0x00007f44b84ecdad <x264_slicetype_analyse+781>:        (bad)
0x00007f44b84ecdae <x264_slicetype_analyse+782>:        mov    %r13d,%r12d
0x00007f44b84ecdb1 <x264_slicetype_analyse+785>:        lea    0x1(%r12),%eax
0x00007f44b84ecdb6 <x264_slicetype_analyse+790>:        cltq
0x00007f44b84ecdb8 <x264_slicetype_analyse+792>:        mov    0x45d0(%rsp,%rax,8),%rax
0x00007f44b84ecdc0 <x264_slicetype_analyse+800>:        movl   $0x3,0x4(%rax)
0x00007f44b84ecdc7 <x264_slicetype_analyse+807>:        jmpq   0x7f44b84ecb88 <x264_slicetype_analyse+232>
0x00007f44b84ecdcc <x264_slicetype_analyse+812>:        mov    0x58(%rsp),%eax
0x00007f44b84ecdd0 <x264_slicetype_analyse+816>:        mov    0x5c(%r14),%ebp
0x00007f44b84ecdd4 <x264_slicetype_analyse+820>:        sub    $0x1,%eax
0x00007f44b84ecdd7 <x264_slicetype_analyse+823>:        cmp    %ebp,0x58(%rsp)
0x00007f44b84ecddb <x264_slicetype_analyse+827>:        cmovle %eax,%ebp
0x00007f44b84ecdde <x264_slicetype_analyse+830>:        cmpl   $0x0,0x58(%r14)
End of assembler dump.


(gdb) info all-registers
rax            0x0      0
rbx            0x1      1
rcx            0x1      1
rdx            0x24     36
rsi            0x3d     61
rdi            0x23     35
rbp            0xea     0xea
rsp            0x7f44b9be5620   0x7f44b9be5620
r8             0x10627  67111
r9             0x5bed   23533
r10            0x0      0
r11            0x7f44b9be5484   139933150762116
r12            0xfffffffe       4294967294
r13            0x1      1
r14            0x7f44bc099440   139933189248064
r15            0x7f44b9be9bf0   139933150780400
rip            0x7f44b84ecdc0   0x7f44b84ecdc0 <x264_slicetype_analyse+800>
eflags         0x10282  [ SF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
st0            -inf     (raw 0xffff0000000000000000)
st1            -inf     (raw 0xffff0000000000000000)
st2            -inf     (raw 0xffff0000000000000000)
st3            -nan(0xebebebebebebebeb) (raw 0xffffebebebebebebebeb)
st4            -nan(0xebebebebebebebeb) (raw 0xffffebebebebebebebeb)
st5            -nan(0xebebebebebebebeb) (raw 0xffffebebebebebebebeb)
---Type <return> to continue, or q <return> to quit---
st6            -nan(0xebebebebebebebeb) (raw 0xffffebebebebebebebeb)
st7            -nan(0xebebebebebebebeb) (raw 0xffffebebebebebebebeb)
fctrl          0x37f    895
fstat          0x20     32
ftag           0xffff   65535
fiseg          0x7f44   32580
fioff          0xd729c2a7       -685129049
foseg          0x7fff   32767
fooff          0xe15efd78       -513868424
fop            0x51f    1311
xmm0           {v4_float = {0x0, 0x1, 0x0, 0x0}, v2_double = {0x1, 0x0}, v16_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0xf0, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x0, 0x0, 0x0, 0x3ff0, 0x0, 0x0, 0x0, 0x0},
  v4_int32 = {0x0, 0x3ff00000, 0x0, 0x0}, v2_int64 = {0x3ff0000000000000, 0x0},
  uint128 = 0x00000000000000003ff0000000000000}
xmm1           {v4_float = {0x2, 0x1, 0x2, 0x1}, v2_double = {0x0, 0x0}, v16_int8 = {0x0, 0x0, 0x0, 0x40, 0x57, 0x41,
    0xda, 0x3f, 0x0, 0x0, 0x0, 0x40, 0x57, 0x41, 0xda, 0x3f}, v8_int16 = {0x0, 0x4000, 0x4157, 0x3fda, 0x0, 0x4000,
    0x4157, 0x3fda}, v4_int32 = {0x40000000, 0x3fda4157, 0x40000000, 0x3fda4157}, v2_int64 = {0x3fda415740000000,
    0x3fda415740000000}, uint128 = 0x3fda4157400000003fda415740000000}
xmm2           {v4_float = {0x0, 0x6, 0x0, 0x0}, v2_double = {0x5bed, 0x0}, v16_int8 = {0x0, 0x0, 0x0, 0x0, 0x40,
    0xfb, 0xd6, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1}, v8_int16 = {0x0, 0x0, 0xfb40, 0x40d6, 0x0, 0x0, 0x0,
    0x100}, v4_int32 = {0x0, 0x40d6fb40, 0x0, 0x1000000}, v2_int64 = {0x40d6fb4000000000, 0x100000000000000},
  uint128 = 0x010000000000000040d6fb4000000000}
xmm3           {v4_float = {0x0, 0x7, 0x0, 0x0}, v2_double = {0x9a9b, 0x0}, v16_int8 = {0x0, 0xa0, 0x1a, 0x60, 0x70,
    0x53, 0xe3, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0xa000, 0x601a, 0x5370, 0x40e3, 0x0, 0x0,
    0x0, 0x0}, v4_int32 = {0x601aa000, 0x40e35370, 0x0, 0x0}, v2_int64 = {0x40e35370601aa000, 0x0},
  uint128 = 0x000000000000000040e35370601aa000}
xmm4           {v4_float = {0x0, 0x7, 0x0, 0x0}, v2_double = {0x10627, 0x8000000000000000}, v16_int8 = {0x0, 0x0,
    0x0, 0x0, 0x70, 0x62, 0xf0, 0x40, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb}, v8_int16 = {0x0, 0x0, 0x6270,
    0x40f0, 0xebeb, 0xebeb, 0xebeb, 0xebeb}, v4_int32 = {0x0, 0x40f06270, 0xebebebeb, 0xebebebeb}, v2_int64 = {
    0x40f0627000000000, 0xebebebebebebebeb}, uint128 = 0xebebebebebebebeb40f0627000000000}
---Type <return> to continue, or q <return> to quit---
xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {
    0x0, 0xeb <repeats 15 times>}, v8_int16 = {0xeb00, 0xebeb, 0xebeb, 0xebeb, 0xebeb, 0xebeb, 0xebeb, 0xebeb},
  v4_int32 = {0xebebeb00, 0xebebebeb, 0xebebebeb, 0xebebebeb}, v2_int64 = {0xebebebebebebeb00, 0xebebebebebebebeb},
  uint128 = 0xebebebebebebebebebebebebebebeb00}
xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {
    0x3b, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xb0, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb}, v8_int16 = {
    0xeb3b, 0xebeb, 0xebeb, 0xebeb, 0xebb0, 0xebeb, 0xebeb, 0xebeb}, v4_int32 = {0xebebeb3b, 0xebebebeb, 0xebebebb0,
    0xebebebeb}, v2_int64 = {0xebebebebebebeb3b, 0xebebebebebebebb0}, uint128 = 0xebebebebebebebb0ebebebebebebeb3b}
xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0, 0x10, 0x0, 0x0, 0x0, 0x10,
    0x0, 0x10, 0xff, 0x8, 0xff, 0x0, 0xff, 0x8, 0xff, 0x0}, v8_int16 = {0x1000, 0x0, 0x1000, 0x1000, 0x8ff, 0xff,
    0x8ff, 0xff}, v4_int32 = {0x1000, 0x10001000, 0xff08ff, 0xff08ff}, v2_int64 = {0x1000100000001000,
    0xff08ff00ff08ff}, uint128 = 0x00ff08ff00ff08ff1000100000001000}
xmm8           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0,
    0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0}, v8_int16 = {0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb,
    0xeb}, v4_int32 = {0xeb00eb, 0xeb00eb, 0xeb00eb, 0xeb00eb}, v2_int64 = {0xeb00eb00eb00eb, 0xeb00eb00eb00eb},
  uint128 = 0x00eb00eb00eb00eb00eb00eb00eb00eb}
xmm9           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0,
    0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0}, v8_int16 = {0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb,
    0xeb}, v4_int32 = {0xeb00eb, 0xeb00eb, 0xeb00eb, 0xeb00eb}, v2_int64 = {0xeb00eb00eb00eb, 0xeb00eb00eb00eb},
  uint128 = 0x00eb00eb00eb00eb00eb00eb00eb00eb}
xmm10          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0,
    0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0}, v8_int16 = {0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb,
    0xeb}, v4_int32 = {0xeb00eb, 0xeb00eb, 0xeb00eb, 0xeb00eb}, v2_int64 = {0xeb00eb00eb00eb, 0xeb00eb00eb00eb},
  uint128 = 0x00eb00eb00eb00eb00eb00eb00eb00eb}
xmm11          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0,
    0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0, 0xeb, 0x0}, v8_int16 = {0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb, 0xeb,
    0xeb}, v4_int32 = {0xeb00eb, 0xeb00eb, 0xeb00eb, 0xeb00eb}, v2_int64 = {0xeb00eb00eb00eb, 0xeb00eb00eb00eb},
  uint128 = 0x00eb00eb00eb00eb00eb00eb00eb00eb}
xmm12          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0,
    0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0}, v8_int16 = {0xb2, 0xb2, 0xb2, 0xb2, 0xb2, 0xb2, 0xb2,
---Type <return> to continue, or q <return> to quit---
    0xb2}, v4_int32 = {0xb200b2, 0xb200b2, 0xb200b2, 0xb200b2}, v2_int64 = {0xb200b200b200b2, 0xb200b200b200b2},
  uint128 = 0x00b200b200b200b200b200b200b200b2}
xmm13          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0,
    0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0}, v8_int16 = {0xb2, 0xb2, 0xb2, 0xb2, 0xb2, 0xb2, 0xb2,
    0xb2}, v4_int32 = {0xb200b2, 0xb200b2, 0xb200b2, 0xb200b2}, v2_int64 = {0xb200b200b200b2, 0xb200b200b200b2},
  uint128 = 0x00b200b200b200b200b200b200b200b2}
xmm14          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0,
    0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0, 0xb2, 0x0}, v8_int16 = {0xb2, 0xb2, 0xb2, 0xb2, 0xb2, 0xb2, 0xb2,
    0xb2}, v4_int32 = {0xb200b2, 0xb200b2, 0xb200b2, 0xb200b2}, v2_int64 = {0xb200b200b200b2, 0xb200b200b200b2},
  uint128 = 0x00b200b200b200b200b200b200b200b2}
xmm15          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x10, 0x0, 0x10, 0x0, 0x10, 0x0,
    0x10, 0x0, 0x10, 0x0, 0x10, 0x0, 0x10, 0x0, 0x10, 0x0}, v8_int16 = {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
    0x10}, v4_int32 = {0x100010, 0x100010, 0x100010, 0x100010}, v2_int64 = {0x10001000100010, 0x10001000100010},
  uint128 = 0x00100010001000100010001000100010}
mxcsr          0x1fa7   [ IE DE ZE PE IM DM ZM OM UM PM ]



More information about the x264-devel mailing list