[FFmpeg-trac] #6349(undetermined:new): libmp3lame encode segfaults with audio filter
FFmpeg
trac at avcodec.org
Tue Apr 25 11:48:23 EEST 2017
#6349: libmp3lame encode segfaults with audio filter
-------------------------------------+-------------------------------------
Reporter: kylophone | Owner:
Type: defect | Status: new
Priority: important | Component:
Version: unspecified | undetermined
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by cehoyos):
For future tickets: The backtrace only makes sense if you don't use
{{{--enable-shared}}} (or if you use {{{--disable-stripping}}}).
Regression since 383057f8e744efeaaa3648a59bc577b25b055835
{{{
(gdb) r -i clip.wav -af volume -f null -acodec mp3 -
Starting program: ffmpeg_g -i clip.wav -af volume -f null -acodec mp3 -
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
ffmpeg version N-85642-gdfc4ce5 Copyright (c) 2000-2017 the FFmpeg
developers
built with gcc 4.7 (SUSE Linux)
configuration: --enable-libmp3lame
libavutil 55. 61.100 / 55. 61.100
libavcodec 57. 93.100 / 57. 93.100
libavformat 57. 72.101 / 57. 72.101
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 87.100 / 6. 87.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
Input #0, wav, from 'clip.wav':
Metadata:
date : 2017-01-0
encoder : Lavf57.72.101
encoded_by : Pro Tools
Duration: 00:00:15.02, bitrate: 1152 kb/s
Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s24le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[New Thread 0x7ffff4780700 (LWP 11328)]
[New Thread 0x7ffff3f7f700 (LWP 11329)]
[New Thread 0x7ffff377e700 (LWP 11330)]
[New Thread 0x7ffff2f7d700 (LWP 11331)]
[New Thread 0x7ffff277c700 (LWP 11332)]
[New Thread 0x7ffff1f7b700 (LWP 11333)]
[New Thread 0x7ffff177a700 (LWP 11334)]
[New Thread 0x7ffff0f79700 (LWP 11335)]
[New Thread 0x7ffff0778700 (LWP 11336)]
Output #0, null, to 'pipe:':
Metadata:
date : 2017-01-0
encoded_by : Pro Tools
encoder : Lavf57.72.101
Stream #0:0: Audio: mp3 (libmp3lame), 48000 Hz, mono, fltp (24 bit)
Metadata:
encoder : Lavc57.93.100 libmp3lame
Program received signal SIGSEGV, Segmentation fault.
ff_vector_fmul_scalar_sse () at libavutil/x86/float_dsp.asm:152
152 VECTOR_FMUL_SCALAR
(gdb) bt full
#0 ff_vector_fmul_scalar_sse () at libavutil/x86/float_dsp.asm:152
No locals.
#1 0x000000000091eeaa in mp3lame_encode_frame (avctx=0x202f800,
avpkt=0x204b880, frame=0x1fee8a0, got_packet_ptr=0x7fffffffcd3c) at
libavcodec/libmp3lame.c:211
s = 0x1feda60
hdr = {frame_size = 33476896, error_protection = 0, layer = 24,
sample_rate = 48, sample_rate_index = -1, bit_rate = 32767, nb_channels =
-13264, mode = 32767, mode_ext = 192, lsf = 0}
len = <optimized out>
ret = <optimized out>
ch = <optimized out>
discard_padding = <optimized out>
lame_result = <optimized out>
h = 33868596
#2 0x00000000007bfdfc in avcodec_encode_audio2
(avctx=avctx at entry=0x202f800, avpkt=0x204b880,
frame=frame at entry=0x1fee8a0,
got_packet_ptr=got_packet_ptr at entry=0x7fffffffcd3c) at
libavcodec/encode.c:198
extended_frame = <optimized out>
padded_frame = 0x0
ret = <optimized out>
user_pkt = {buf = 0x0, pts = <optimized out>, dts = <optimized
out>, data = 0x0, size = <optimized out>, stream_index = <optimized out>,
flags = <optimized out>, side_data = <optimized out>, side_data_elems =
<optimized out>, duration = <optimized out>,
pos = <optimized out>, convergence_duration = <optimized out>}
needs_realloc = 1
#3 0x00000000007c0805 in do_encode (avctx=0x202f800, frame=0x1fee8a0,
got_packet=0x7fffffffcd3c) at libavcodec/encode.c:375
ret = <optimized out>
#4 0x00000000007c08ef in avcodec_send_frame (avctx=avctx at entry=0x202f800,
frame=frame at entry=0x1fee8a0) at libavcodec/encode.c:421
No locals.
#5 0x0000000000498c2d in do_audio_out (frame=0x1fee8a0, ost=0x1fed620,
of=0x1fec220) at ffmpeg.c:920
enc = 0x202f800
pkt = {buf = 0x0, pts = -9223372036854775808, dts =
-9223372036854775808, data = 0x0, size = 0, stream_index = 0, flags = 0,
side_data = 0x0, side_data_elems = 0, duration = 0, pos = -1,
convergence_duration = 0}
ret = <optimized out>
#6 reap_filters (flush=flush at entry=0) at ffmpeg.c:1514
float_pts = <optimized out>
filter = 0x2034e40
ret = <optimized out>
ost = 0x1fed620
of = 0x1fec220
enc = 0x202f800
i = <optimized out>
#7 0x000000000049ce42 in transcode_from_filter (best_ist=<synthetic
pointer>, graph=0x20301e0) at ffmpeg.c:4424
i = <optimized out>
ret = 0
nb_requests = <optimized out>
ifilter = <optimized out>
nb_requests_max = 0
ist = <optimized out>
#8 transcode_step () at ffmpeg.c:4488
ist = 0x0
ret = <optimized out>
#9 transcode () at ffmpeg.c:4564
cur_time = 5716902361
ret = <optimized out>
i = <optimized out>
os = <optimized out>
ost = <optimized out>
ist = <optimized out>
timer_start = 5716702776
total_packets_written = 0
#10 0x000000000047f842 in main (argc=<optimized out>, argv=0x7fffffffdce8)
at ffmpeg.c:4769
ret = <optimized out>
ti = <optimized out>
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0x47f822 to 0x47f862:
0x000000000047f822 <main+258>: callq 0x407090 <getrusage at plt>
0x000000000047f827 <main+263>: mov (%rsp),%rax
0x000000000047f82b <main+267>: imul $0xf4240,%rax,%rbx
0x000000000047f832 <main+274>: add 0x8(%rsp),%rbx
0x000000000047f837 <main+279>: mov %ebx,0x1302367(%rip)
# 0x1781ba4 <current_time>
0x000000000047f83d <main+285>: callq 0x49c860 <transcode>
=> 0x000000000047f842 <main+290>: test %eax,%eax
0x000000000047f844 <main+292>: js 0x47f92a <main+522>
0x000000000047f84a <main+298>: xor %edi,%edi
0x000000000047f84c <main+300>: mov %rsp,%rsi
0x000000000047f84f <main+303>: callq 0x407090 <getrusage at plt>
0x000000000047f854 <main+308>: cmpl $0x0,0x1302251(%rip)
# 0x1781aac <do_benchmark>
0x000000000047f85b <main+315>: mov (%rsp),%rdx
0x000000000047f85f <main+319>: mov 0x8(%rsp),%rax
End of assembler dump.
(gdb) info all-register
rax 0x2034420 33768480
rbx 0x176f 5999
rcx 0x2d0 720
rdx 0xb30 2864
rsi 0x204cb34 33868596
rdi 0x2065580 33969536
rbp 0x7fffffffdce8 0x7fffffffdce8
rsp 0x7fffffffdb60 0x7fffffffdb60
r8 0x0 0
r9 0x7a120 500000
r10 0x1 1
r11 0x8000000000000001 -9223372036854775807
r12 0x47f990 4716944
r13 0x7fffffffdce0 140737488346336
r14 0x0 0
r15 0x0 0
rip 0x47f842 0x47f842 <main+290>
eflags 0x10202 [ IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
st0 0 (raw 0x00000000000000000000)
st1 0 (raw 0x00000000000000000000)
st2 0 (raw 0x00000000000000000000)
st3 0 (raw 0x00000000000000000000)
st4 0 (raw 0x00000000000000000000)
st5 0 (raw 0x00000000000000000000)
st6 0 (raw 0x00000000000000000000)
st7 0 (raw 0x00000000000000000000)
fctrl 0x37f 895
fstat 0x0 0
ftag 0xffff 65535
fiseg 0x0 0
fioff 0x0 0
foseg 0x0 0
fooff 0x0 0
fop 0x0 0
mxcsr 0x1fa0 [ PE IM DM ZM OM UM PM ]
ymm0 {v8_float = {0x8000, 0x8000, 0x8000, 0x8000, 0x0, 0x0, 0x0,
0x0}, v4_double = {0x8000000000000000, 0x8000000000000000, 0x0, 0x0},
v32_int8 = {0x0, 0x0, 0x0, 0x47, 0x0, 0x0, 0x0, 0x47, 0x0, 0x0, 0x0, 0x47,
0x0, 0x0, 0x0, 0x47, 0x0 <repeats 16 times>}, v16_int16 = {
0x0, 0x4700, 0x0, 0x4700, 0x0, 0x4700, 0x0, 0x4700, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0x47000000, 0x47000000, 0x47000000,
0x47000000, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x4700000047000000,
0x4700000047000000, 0x0, 0x0}, v2_int128 = {
0x47000000470000004700000047000000,
0x00000000000000000000000000000000}}
ymm1 {v8_float = {0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0xafc80, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x1, 0x0, 0x0,
0xf9, 0x25, 0x41, 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0x1, 0xf900,
0x4125, 0x0 <repeats 12 times>}, v8_int32 = {0x10000,
0x4125f900, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 =
{0x4125f90000010000, 0x0, 0x0, 0x0}, v2_int128 =
{0x00000000000000004125f90000010000, 0x00000000000000000000000000000000}}
ymm2 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0xe0, 0x3e, 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0x0, 0x0,
0x3ee0, 0x0 <repeats 12 times>}, v8_int32 = {0x0, 0x3ee00000, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x3ee0000000000000, 0x0, 0x0,
0x0}, v2_int128 = {0x00000000000000003ee0000000000000,
0x00000000000000000000000000000000}}
ymm3 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0xe0, 0xbe, 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0x0, 0x0,
0xbee0, 0x0 <repeats 12 times>}, v8_int32 = {0x0, 0xbee00000, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0xbee0000000000000, 0x0, 0x0,
0x0}, v2_int128 = {0x0000000000000000bee0000000000000,
0x00000000000000000000000000000000}}
ymm4 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x63, 0xad, 0x92, 0xad, 0x4,
0xc5, 0x85, 0x0, 0x8b, 0x20, 0x4c, 0x24, 0x2a, 0xe5, 0x4f, 0xa2, 0x0
<repeats 16 times>}, v16_int16 = {0xad63, 0xad92, 0xc504, 0x85,
0x208b, 0x244c, 0xe52a, 0xa24f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0}, v8_int32 = {0xad92ad63, 0x85c504, 0x244c208b, 0xa24fe52a, 0x0, 0x0,
0x0, 0x0}, v4_int64 = {0x85c504ad92ad63, 0xa24fe52a244c208b, 0x0, 0x0},
v2_int128 = {0xa24fe52a244c208b0085c504ad92ad63,
0x00000000000000000000000000000000}}
ymm5 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x8000000000000000, 0x0, 0x0, 0x0}, v32_int8 = {0xc3, 0x47,
0x45, 0x8d, 0x8a, 0x2c, 0x44, 0x71, 0x75, 0x5a, 0x18, 0x92, 0x4f, 0xe7,
0xff, 0x36, 0x0 <repeats 16 times>}, v16_int16 = {0x47c3,
0x8d45, 0x2c8a, 0x7144, 0x5a75, 0x9218, 0xe74f, 0x36ff, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0x8d4547c3, 0x71442c8a, 0x92185a75,
0x36ffe74f, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x71442c8a8d4547c3,
0x36ffe74f92185a75, 0x0, 0x0}, v2_int128 = {
0x36ffe74f92185a7571442c8a8d4547c3,
0x00000000000000000000000000000000}}
ymm6 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xed, 0xa5, 0x5b, 0xed,
0x77, 0xff, 0xa0, 0x0, 0xd1, 0xb9, 0x47, 0x24, 0x89, 0xbb, 0xea, 0x94, 0x0
<repeats 16 times>}, v16_int16 = {0xa5ed, 0xed5b, 0xff77, 0xa0,
0xb9d1, 0x2447, 0xbb89, 0x94ea, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0}, v8_int32 = {0xed5ba5ed, 0xa0ff77, 0x2447b9d1, 0x94eabb89, 0x0, 0x0,
0x0, 0x0}, v4_int64 = {0xa0ff77ed5ba5ed, 0x94eabb892447b9d1, 0x0, 0x0},
v2_int128 = {0x94eabb892447b9d100a0ff77ed5ba5ed,
0x00000000000000000000000000000000}}
ymm7 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x1, 0xb8, 0x38,
0x4c, 0xc1, 0x9, 0x15, 0x22, 0xee, 0xb, 0xf0, 0xbe, 0x78, 0xb6, 0x0
<repeats 16 times>}, v16_int16 = {0x0, 0xb801, 0x4c38, 0x9c1,
0x2215, 0xbee, 0xbef0, 0xb678, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0}, v8_int32 = {0xb8010000, 0x9c14c38, 0xbee2215, 0xb678bef0, 0x0, 0x0,
0x0, 0x0}, v4_int64 = {0x9c14c38b8010000, 0xb678bef00bee2215, 0x0, 0x0},
v2_int128 = {0xb678bef00bee221509c14c38b8010000,
0x00000000000000000000000000000000}}
ymm8 {v8_float = {0x0, 0x866c2000, 0x0, 0xffffffe2, 0x0, 0x0,
0x0, 0x0}, v4_double = {0x8000000000000000, 0xfffffffeae9a1020, 0x0, 0x0},
v32_int8 = {0x1b, 0x8b, 0xe3, 0xa1, 0x10, 0x36, 0xc3, 0x4f, 0x14, 0x37,
0x6, 0xfe, 0x5e, 0x16, 0xf5, 0xc1, 0x0 <repeats 16 times>},
v16_int16 = {0x8b1b, 0xa1e3, 0x3610, 0x4fc3, 0x3714, 0xfe06, 0x165e,
0xc1f5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0xa1e38b1b,
0x4fc33610, 0xfe063714, 0xc1f5165e, 0x0, 0x0, 0x0, 0x0}, v4_int64 =
{0x4fc33610a1e38b1b, 0xc1f5165efe063714, 0x0, 0x0}, v2_int128 = {
0xc1f5165efe0637144fc33610a1e38b1b,
0x00000000000000000000000000000000}}
ymm9 {v8_float = {0xc7a, 0x0, 0xf2a57a20, 0x0, 0x0, 0x0, 0x0,
0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xb8, 0xa8, 0x47,
0x45, 0x86, 0xd7, 0x16, 0x5, 0x5e, 0xa8, 0x55, 0xcd, 0xd0, 0xa2, 0xea,
0x1c, 0x0 <repeats 16 times>}, v16_int16 = {0xa8b8, 0x4547,
0xd786, 0x516, 0xa85e, 0xcd55, 0xa2d0, 0x1cea, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0}, v8_int32 = {0x4547a8b8, 0x516d786, 0xcd55a85e,
0x1ceaa2d0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x516d7864547a8b8,
0x1ceaa2d0cd55a85e, 0x0, 0x0}, v2_int128 = {
0x1ceaa2d0cd55a85e0516d7864547a8b8,
0x00000000000000000000000000000000}}
ymm10 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x97, 0xd3, 0x1b, 0x3f, 0x0
<repeats 28 times>}, v16_int16 = {0xd397, 0x3f1b, 0x0 <repeats 14 times>},
v8_int32 = {0x3f1bd397, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_int64 = {0x3f1bd397, 0x0, 0x0, 0x0}, v2_int128 =
{0x0000000000000000000000003f1bd397, 0x00000000000000000000000000000000}}
ymm11 {v8_float = {0xffffffd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x70, 0xe5, 0x42,
0xc2, 0x34, 0xf9, 0xb4, 0x3d, 0x0 <repeats 24 times>}, v16_int16 =
{0xe570, 0xc242, 0xf934, 0x3db4, 0x0 <repeats 12 times>}, v8_int32 = {
0xc242e570, 0x3db4f934, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 =
{0x3db4f934c242e570, 0x0, 0x0, 0x0}, v2_int128 =
{0x00000000000000003db4f934c242e570, 0x00000000000000000000000000000000}}
ymm12 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x4f, 0x9c, 0xb1, 0x6c,
0x78, 0xc2, 0xb6, 0x3d, 0x0 <repeats 24 times>}, v16_int16 = {0x9c4f,
0x6cb1, 0xc278, 0x3db6, 0x0 <repeats 12 times>}, v8_int32 = {
0x6cb19c4f, 0x3db6c278, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 =
{0x3db6c2786cb19c4f, 0x0, 0x0, 0x0}, v2_int128 =
{0x00000000000000003db6c2786cb19c4f, 0x00000000000000000000000000000000}}
ymm13 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xcd, 0x13, 0xd4, 0x3e, 0x0
<repeats 28 times>}, v16_int16 = {0x13cd, 0x3ed4, 0x0 <repeats 14 times>},
v8_int32 = {0x3ed413cd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_int64 = {0x3ed413cd, 0x0, 0x0, 0x0}, v2_int128 =
{0x0000000000000000000000003ed413cd, 0x00000000000000000000000000000000}}
ymm14 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x8b, 0x6f, 0x44, 0x3f, 0x0
<repeats 28 times>}, v16_int16 = {0x6f8b, 0x3f44, 0x0 <repeats 14 times>},
v8_int32 = {0x3f446f8b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_int64 = {0x3f446f8b, 0x0, 0x0, 0x0}, v2_int128 =
{0x0000000000000000000000003f446f8b, 0x00000000000000000000000000000000}}
ymm15 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xea, 0xcf, 0x6, 0x3e, 0x0
<repeats 28 times>}, v16_int16 = {0xcfea, 0x3e06, 0x0 <repeats 14 times>},
v8_int32 = {0x3e06cfea, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_int64 = {0x3e06cfea, 0x0, 0x0, 0x0}, v2_int128 =
{0x0000000000000000000000003e06cfea, 0x00000000000000000000000000000000}}
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6349#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list