Opened 11 years ago

Closed 11 years ago

#2722 closed defect (fixed)

crash in low memory situation

Reported by: ami_stuff Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: crash SIGSEGV
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Please try to reproduce this crash:

knoppix@Microknoppix:/media/sda1$ ulimit -Sv 23920 
knoppix@Microknoppix:/media/sda1$ ./ffmpeg2 -i divx.avi 
ffmpeg version N-54234-gef90639 Copyright (c) 2000-2013 the FFmpeg developers 
  built on Jun 28 2013 05:12:50 with gcc 4.6 (Debian 4.6.3-1) 
  configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32 --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static' --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx 
  libavutil      52. 37.101 / 52. 37.101 
  libavcodec     55. 17.100 / 55. 17.100 
  libavformat    55. 10.100 / 55. 10.100 
  libavdevice    55.  2.100 / 55.  2.100 
  libavfilter     3. 77.101 /  3. 77.101 
  libswscale      2.  3.100 /  2.  3.100 
  libswresample   0. 17.102 /  0. 17.102 
  libpostproc    52.  3.100 / 52.  3.100 
[mpeg4 @ 0x976d8a0] Invalid and inefficient vfw-avi packed B frames detected 
Segmentation fault 
knoppix@Microknoppix:/media/sda1$ 

I used 32bit build from here for test:

http://ffmpeg.gusari.org/static/32bit/ffmpeg.static.32bit.2013-06-28.tar.gz

Attachments (1)

divx.avi (1.5 MB ) - added by ami_stuff 11 years ago.

Download all attachments as: .zip

Change History (5)

by ami_stuff, 11 years ago

Attachment: divx.avi added

comment:1 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavcodec
Keywords: crash SIGSEGV added
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Patch sent.

(gdb) r -max_alloc 33000 -i divx.avi
Starting program: ffmpeg_g -max_alloc 33000 -i divx.avi
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
ffmpeg version N-54246-g2bccd82 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun 28 2013 16:52:37 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 37.101 / 52. 37.101
  libavcodec     55. 17.100 / 55. 17.100
  libavformat    55. 10.100 / 55. 10.100
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 77.101 /  3. 77.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[mpeg4 @ 0x1693b00] Invalid and inefficient vfw-avi packed B frames detected

Program received signal SIGSEGV, Segmentation fault.
0x00000000009cb4db in avcodec_decode_audio4 (avctx=0x16947c0, frame=0x169a360,
    got_frame_ptr=got_frame_ptr@entry=0x7fffffffd16c, avpkt=avpkt@entry=0x7fffffffd1a0)
    at libavcodec/utils.c:2064
2064        if (avctx->codec->type != AVMEDIA_TYPE_AUDIO) {
(gdb) bt
#0  0x00000000009cb4db in avcodec_decode_audio4 (avctx=0x16947c0, frame=0x169a360,
    got_frame_ptr=got_frame_ptr@entry=0x7fffffffd16c, avpkt=avpkt@entry=0x7fffffffd1a0)
    at libavcodec/utils.c:2064
#1  0x00000000005bf004 in try_decode_frame (st=st@entry=0x1694460,
    avpkt=avpkt@entry=0x1699120, options=0x16939c0) at libavformat/utils.c:2451
#2  0x00000000005c6a40 in avformat_find_stream_info (ic=0x1693020, options=0x16939c0)
    at libavformat/utils.c:2880
#3  0x0000000000463909 in open_input_file (o=o@entry=0x7fffffffd750, filename=<optimized out>)
    at ffmpeg_opt.c:814
#4  0x000000000045e402 in open_files (inout=<optimized out>, inout@entry=0xc6febf "input",
    open_file=open_file@entry=0x463560 <open_input_file>, l=<optimized out>, l=<optimized out>)
    at ffmpeg_opt.c:2483
#5  0x0000000000464c99 in ffmpeg_parse_options (argc=argc@entry=5,
    argv=argv@entry=0x7fffffffdde8) at ffmpeg_opt.c:2520
#6  0x000000000045bf48 in main (argc=5, argv=0x7fffffffdde8) at ffmpeg.c:3368
(gdb) print avctx->codec
$1 = (const struct AVCodec *) 0x0

comment:2 by Carl Eugen Hoyos, 11 years ago

Summary: mpeg4 crash in low memory situationcrash in low memory situation

comment:3 by Carl Eugen Hoyos, 11 years ago

Should be fixed, thank you for the report!

comment:4 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.