--- On Sun, 12/9/10, Vitor Sessak <[email protected]> wrote:
From: Vitor Sessak <[email protected]> Subject: Re: [libav-user] Invalid read in FFmpeg 0.6 version reported by valgrind To: [email protected] Date: Sunday, 12 September, 2010, 11:33 PM On 09/13/2010 12:36 AM, debanjana kayal wrote: > > > --- On Sun, 12/9/10, Vitor Sessak<[email protected]> wrote: > > > From: Vitor Sessak<[email protected]> > Subject: Re: [libav-user] Invalid read in FFmpeg 0.6 version reported by > valgrind > To: [email protected] > Date: Sunday, 12 September, 2010, 7:33 PM > > > On 09/12/2010 06:38 PM, debanjana kayal wrote: >> >> >> --- On Sun, 12/9/10, Vitor Sessak<[email protected]> wrote: >> >> >> From: Vitor Sessak<[email protected]> >> Subject: Re: [libav-user] Invalid read in FFmpeg 0.6 version reported by >> valgrind >> To: [email protected] >> Date: Sunday, 12 September, 2010, 10:26 AM >> >> >> On 09/12/2010 11:42 AM, debanjana kayal wrote: >>> Hi >>> I am using FFmpeg 0.6 version for ppc. >>> I get the following when I run using valgrind.I would apprieciate any help. >>> The configuration used by me is: >>> >>> >>> ./configure --enable-debug=3 --disable-stripping --enable-cross-compile >>> --arch=ppc --target-os=linux --disable-static --enable-shared >>> --disable-encoders --disable-decoders --disable-bsfs --disable-filters >>> --disable-muxers --disable-hwaccels --disable-indevs --disable-outdevs >>> --disable-devices --disable-protocols --disable-demuxers --disable-parsers >>> --disable-altivec --disable-decoder=vorbis --enable-decoder=mp3 >>> --enable-decoder=aac --enable-parser=aac --enable-parser=mpegaudio >>> --enable-demuxer=aac --enable-demuxer=aiff --enable-demuxer=asf >>> --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=pcm_alaw >>> --enable-demuxer=pcm_f32be --enable-demuxer=pcm_f32le >>> --enable-demuxer=pcm_f64be --enable-demuxer=pcm_f64le >>> --enable-demuxer=pcm_mulaw --enable-demuxer=pcm_s16be >>> --enable-demuxer=pcm_s16le --enable-demuxer=pcm_s24be >>> --enable-demuxer=pcm_s24le --enable-demuxer=pcm_s32be >>> --enable-demuxer=pcm_s32le --enable-demuxer=pcm_s8 >>> --enable-demuxer=pcm_u16be >>> --enable-demuxer=pcm_u16le --enable-demuxer=pcm_u24be >>>--enable-demuxer=pcm_u24le --enable-demuxer=pcm_u32be >>>--enable-demuxer=pcm_u32le --enable-demuxer=pcm_u8 --enable-demuxer=wav >>>--enable-demuxer=flac --enable-protocol=file --enable-zlib >>>--enable-decoder=pcm_alaw --enable-decoder=pcm_mulaw >>>--enable-decoder=pcm_f32be --enable-decoder=pcm_f32le >>>--enable-decoder=pcm_f64be --enable-decoder=pcm_f64le >>>--enable-decoder=pcm_s16be --enable-decoder=pcm_s16le >>>--enable-decoder=pcm_s24be --enable-decoder=pcm_s24le >>>--enable-decoder=pcm_s32be --enable-decoder=pcm_s32le >>>--enable-decoder=pcm_u16be --enable-decoder=pcm_u16le >>>--enable-decoder=pcm_u24be --enable-decoder=pcm_u24le >>>--enable-decoder=pcm_u32be --enable-decoder=pcm_u32le >>>--enable-decoder=pcm_u8 --enable-decoder=flac --extra-cflags='-pthread -Wall >>>-mcpu=e300c3 -m32 -g -fPIC -DPIC' --prefix=/opt/FFmpeg/install >> >> Why everybody use endless configure parameters? Just "./configure" does >> not work for you? > >> Isn't it immeterial to the issue being reported.BTW i need to include only >> the formats I need to make the size of the library and my application be as >> minimum . >> On the parameter it is important for me to know will help >> --enable-memalign-hack or how does it work. > > I don't think anything you might add to configure (including > --enable-memalign-hack) will change this invalid read, but I cannot be > sure without understanding the problem. Also, what is the point of > messing around with the cflags? You don't trust the FFmpeg developers to > know which flags works better with their own code? Also, are you > _really_ cross-compiling? > >>> ==19152== Invalid read of size 4 >>> ==19152== at 0xFE0A824: decode_frame (get_bits.h:366) >>> ==19152== by 0xFE1451B: avcodec_decode_audio3 (utils.c:656) >>> ==19152== by 0xFF48F23: av_find_stream_info (utils.c:2045) >>> ==19152== Address 0xcb30f02 is 6 bytes after a block of size 364 alloc'd >>> ==19152== at 0xFF7953C: malloc (vg_replace_malloc.c:236) >>> ==19152== by 0xFD16C83: av_malloc (mem.c:76) >>> ==19152== by 0xFD95FB3: av_dup_packet (avpacket.c:81) >>> ==19152== by 0xFF4813B: av_find_stream_info (utils.c:2261) >>> >>> >>> will using --enable-memalign-hack help? >> >> Can you please tell me if this problem happens when decoding any file or >> just a particular one? Can you also show the full command line you used >> and the full output of ffmpeg? >> >>> I am not yet decoding but only trying to get the parameters using >>> av_find_stream_info.I am not using ffmpeg binary but using myy own >>> application which opens using av_open_input_stream and extracts the stream >>> info. > > Can you test if you can reproduce this problem with the ffmpeg binary? > This helps a lot to know what is happening. > > HERE IS THE OUTPUT FROM FFMPEG BINARY Thank you, that looks like something we could reproduce. > ==20746== Memcheck, a memory error detector . > g . > ==20746== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. > ==20746== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright > info > ==20746== Command: /home/rka/work/Externals/FFmpeg/install/bin/ffmpeg -i > http://216.235.81.102:15240 > ==20746== > FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers > built on Sep 12 2010 22:40:41 with gcc 4.1.2 > configuration: --enable-debug=3 --disable-stripping --enable-cross-compile >--arch=ppc --target-os=linux >--cross-prefix=/opt/wrsysroot/x86-linux2/powerpc-wrs-linux > libavutil 50.15. 1 / 50.15. 1 > libavcodec 52.72. 2 / 52.72. 2 > libavformat 52.64. 2 / 52.64. 2 > libavdevice 52. 2. 0 / 52. 2. 0 > libswscale 0.11. 0 / 0.11. 0 > ==20746== Invalid read of size 4 > ==20746== at 0xFDE665C: decode_frame (get_bits.h:366) > ==20746== by 0xFDF051B: avcodec_decode_audio3 (utils.c:656) > ==20746== by 0xFF27A0B: av_find_stream_info (utils.c:2045) > ==20746== by 0x10009927: opt_input_file (ffmpeg.c:3041) > ==20746== by 0x1001114F: parse_options (cmdutils.c:177) > ==20746== by 0x1000BD4F: main (ffmpeg.c:4143) > ==20746== Address 0x42e2279 is 481 bytes inside a block of size 484 alloc'd > ==20746== at 0xFF7953C: malloc (vg_replace_malloc.c:236) > ==20746== by 0xFCF2C83: av_malloc (mem.c:76) > ==20746== by 0xFD71FB3: av_dup_packet (avpacket.c:81) > ==20746== by 0xFF26C23: av_find_stream_info (utils.c:2261) > ==20746== by 0x10009927: opt_input_file (ffmpeg.c:3041) > ==20746== by 0x1001114F: parse_options (cmdutils.c:177) > ==20746== by 0x1000BD4F: main (ffmpeg.c:4143) Using exactly the same command on x86 with latest svn gives me no error. There are two possible explanations: either this is something specific of your arch, or it was fixed at some point in main SVN. Would you mind trying latest SVN? >>>>Thanks for your time.Yes it might be specfic to architecture.However I >>>>will try using latest SVN code and come back.Are you running this command >>>>in loop i.e many times -as I said earlier it might not give the error in >>>>every run -come comes but quite infrequently. > ==20746== Conditional jump or move depends on uninitialised value(s) > ==20746== at 0xFDDE8F0: ff_mpa_synth_filter (mpegaudiodec.c:729) > ==20746== by 0xFDE430B: decode_frame (mpegaudiodec.c:2204) > ==20746== by 0xFDF051B: avcodec_decode_audio3 (utils.c:656) > ==20746== by 0xFF27A0B: av_find_stream_info (utils.c:2045) > ==20746== by 0x10009927: opt_input_file (ffmpeg.c:3041) > ==20746== by 0x1001114F: parse_options (cmdutils.c:177) > ==20746== by 0x1000BD4F: main (ffmpeg.c:4143) > ==20746== Uninitialised value was created by a heap allocation > ==20746== at 0xFF7953C: malloc (vg_replace_malloc.c:236) > ==20746== by 0xFCF2C83: av_malloc (mem.c:76) > ==20746== by 0xFD71FB3: av_dup_packet (avpacket.c:81) > ==20746== by 0xFF26C23: av_find_stream_info (utils.c:2261) > ==20746== by 0x10009927: opt_input_file (ffmpeg.c:3041) > ==20746== by 0x1001114F: parse_options (cmdutils.c:177) > ==20746== by 0x1000BD4F: main (ffmpeg.c:4143) Don't worry about "uninitialized memory" errors for now, way too many of them in FFmpeg are false-positives instead of real bugs. -Vitor _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
