[FFmpeg-trac] #5584(undetermined:new): FFmpeg libraries leak 1MiB memory chunks on corrupt files
FFmpeg
trac at avcodec.org
Sun May 22 22:31:42 CEST 2016
#5584: FFmpeg libraries leak 1MiB memory chunks on corrupt files
-------------------------------------+-------------------------------------
Reporter: mocmaint | Owner:
Type: defect | Status: new
Priority: important | Component:
Version: git-master | undetermined
Keywords: leak | Resolution:
regression | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by mocmaint):
FFmpeg was previously built without '--disable-debug'. Full FFmpeg
configure originally used is:
CFLAGS="-O2 -fPIC" ./configure --prefix=/usr/local/stow/$(basename
$PWD) --libdir='${prefix}/lib64' --shlibdir='${prefix}/lib64' --enable-
shared --disable-static --disable-yasm --enable-libspeex --enable-
libtheora --enable-libopus --enable-libgme --enable-rpath
'$PWD' was '/tmp/ffmpeg-a0349ae2'.
Adding '--enable-debug' made no difference to ValGrind output (specificly,
backtrace still showed '???').
ValGrind was previously run with '--leak-check=full --show-leak-
kinds=indirect,definite'. Full ValGrind invocation originally used is:
valgrind --tool=memcheck --leak-check=full --show-leak-
kinds=indirect,definite --track-origins=yes --track-fds=yes --gen-
suppressions=all --suppressions=/home/jcf/moc/valgrind/moc.supp
--suppressions=/home/jcf/moc/valgrind/ffmpeg.supp
--suppressions=/home/jcf/moc/valgrind/libasound.supp
--suppressions=/home/jcf/moc/valgrind/libgme.supp
--suppressions=/home/jcf/moc/valgrind/libguile.supp
--suppressions=/home/jcf/moc/valgrind/libmagic.supp
--suppressions=/home/jcf/moc/valgrind/librcc.supp
--suppressions=/home/jcf/moc/valgrind/libspeex.supp
--suppressions=/home/jcf/moc/valgrind/libdb.supp
--suppressions=/home/jcf/moc/valgrind/vfprintf.supp --log-
file=valgrind.8563 ../moc-test/mocp -D -J -T /home/jcf/moc/testing/themes
/transparent-background .
Changing to '--show-leak-kinds=all' made no difference to ValGrind output.
ValGrind version being used is 3.9.0.
Trying to build MOC against an FFmpeg built with static (rather than
shared libraries) failed with:
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../x86_64
-slackware-linux/bin/ld: /usr/local/stow/ffmpeg-
a0349ae2/lib64/libavcodec.a(cavsdsp.o): relocation R_X86_64_PC32 against
symbol `ff_pw_5' can not be used when making a shared object; recompile
with -fPIC
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../x86_64
-slackware-linux/bin/ld: final link failed: Bad value
MOC is available using:
svn co svn://svn.daper.net/moc/trunk
Aggregated patch for the patchset being tested is available using:
wget
ftp://ftp.daper.net/pub/soft/moc/unstable/moc-r2872+ffmpeg_memleak-1.patch.gz
Apply to the current SVN trunk HEAD (r2872) using:
zcat moc-r2872+ffmpeg_memleak-1.patch.gz | patch -p1
The MOC FFmpeg decoder will be found in:
decoder_plugins/ffmpeg
Build as per instructions in README. After installing, delete all
installed decoder plugins in 'lib{,64}/moc/decoder_plugins' *except*
'libffmpeg_decoder.*'.
Then launch MOC as 'mocp' in the directory containing corrupt files.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5584#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list