GNOME Bugzilla – Bug 515701
[smoke] Several valgrind warnings exposed by unit test
Last modified: 2008-02-12 05:14:07 UTC
Hi, when running the pipelines/simple-launch-lines unit test under valgrind the smokedec and smokeenc elements are producing some warnings. All but one are generated inside of libjpeg, the other one seems to be a false warning by valgrind. Patches for suppressions and to prevent the false warning attached.
Created attachment 104895 [details] [review] smoke.diff
if by 'false warning in valgrind' you mean it warns that encsize is used uninitialised, valgrind usually knows best there :) It looks like this line: smokecodec_encode (smokeenc->info, data, flags, outdata, &encsize); is passing encsize uninitialised, where I think it should be initialised to outsize just before - it looks like you pass in the allocated size of the output buffer, and it passes back the amount that was used. That's a wasteful way to do it, of course - a pattern like that lead to massive memory use in the ffmpeg decoder because it massively over-supplied the allocated output buffer for each encode call.
Created attachment 104941 [details] [review] smoke.diff Implemented Jan's idea
Ta, seems to work here.
2008-02-12 Sebastian Dröge <slomo@circular-chaos.org> * ext/jpeg/gstsmokeenc.c: (gst_smokeenc_chain): * tests/check/Makefile.am: * tests/check/gst-plugins-good.supp: Add a few libjpeg suppressions and initialize a variable to make smokeenc valgrind clean. Fixes bug #515701.