On Sun, Sep 18, 2011 at 8:51 AM, Mikko Rapeli <span dir="ltr"><<a href="mailto:mikko.rapeli@iki.fi" target="_blank">mikko.rapeli@iki.fi</a>></span> wrote:<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Sat, Sep 17, 2011 at 07:25:56PM -0700, Dan Dennedy wrote:<br>
> On Sat, Sep 17, 2011 at 1:49 PM, Mikko Rapeli <<a href="mailto:mikko.rapeli@iki.fi" target="_blank">mikko.rapeli@iki.fi</a>> wrote:<br>
> > On Sat, Sep 17, 2011 at 09:19:39PM +0200, Till Theato wrote:<br>
> >> -----BEGIN PGP SIGNED MESSAGE-----<br>
> >> Hash: SHA1<br>
> >><br>
> >> On 08/28/2011 12:24 PM, Mikko Rapeli wrote:<br>
> >> > While waiting for proxy clips to be generated, I decided to run<br>
> >> > cppcheck on kdenlive and fix most of the issues found. I used<br>
> >> > cppcheck version<br>
> >><br>
> >> Thanks a lot!<br>
> >> jbm applied all your patches in the meantime.<br>
> ><br>
> > You're welcome. I noticed them in git a few days back.<br>
> ><br>
> > Has anyone run valgrind with mlt and kdenlive?<br>
> ><br>
> > I noticed a ton of Qt related complains and a number of other items<br>
> > with leackcheck but most of the complains don't come from kdenlive directly.<br>
> > My first test case was just to start kdenlive without a project.<br>
><br>
> I do occasionally with mlt. A number of things seem to occur with<br>
> dependencies and dlopen and related. For example, with swfdec, if it<br>
> is built against gstreamer, seems to generate a lot of complaints. I<br>
> made suppressions for things related to dlerror_run or things I<br>
> struggled to track down due to lack of symbols and that trace back to<br>
> mlt_factory_init (something that seems to occur once just due to<br>
> loading a plugin). However, coverage is another issue. I do not<br>
> usually have much time to create tests to exercise various code paths.<br>
<br>
</div>Ok, I will try to run it while rendering one of my projects too.<br>
<br>
Btw, one of the findings which puzle me is this:<br>
<br>
==9377== Invalid read of size 4<br>
==9377== at 0x4059AB4: mlt_properties_parse_yaml (mlt_properties.c:1611)<br>
==9377== by 0x20201F: ???<br>
==9377== Address 0xcaa34a8 is 48 bytes inside a block of size 51 alloc'd<br>
==9377== at 0x4023796: calloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-li<br>
nux.so)<br>
==9377== by 0x4059A8B: mlt_properties_parse_yaml (mlt_properties.c:1609)<br>
==9377== by 0x20201F: ???<br>
<br>
Where code is:<br>
<br>
1606 // Blank line (prepended with spaces) is new line<br>
1607 if ( strcmp( name, "" ) == 0 )<br>
1608 {<br>
1609 value = calloc( 1, strlen( old_value ) + 2 );<br>
1610 strcat( value, old_value );<br>
1611 strcat( value, "\n" );<br>
1612 }<br>
<br>
To me this looks correct, but valgrind is constantly complaining about it.<br>
<font color="#888888"><br></font></blockquote><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div>
<br></div><div>Not so surprising if the implementation is this:</div><div><a href="http://www.student.cs.uwaterloo.ca/~cs350/common/os161-src-html/strcat_8c-source.html" target="_blank" style="color: rgb(17, 37, 8); ">http://www.student.cs.uwaterloo.ca/~cs350/common/os161-src-html/strcat_8c-source.html</a></div>
<div>It uses pointer arithmetic, and hence copies stuff into a pointer that is exactly 2 bytes less that you have calloc'd, that matches the length of the input in your case. I thought that valgrind had a list of "known to work fine issues it should not report" (= suppression lists), and the same should apply for Qt.</div>
<div><br></div><div>You could create a suppression list for stuff you known you won't fix by using the simple steps here: <a href="http://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto" target="_blank" style="color: rgb(17, 37, 8); ">http://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto</a></div>
<div><br></div><div>--paf</div></span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="#888888">
-Mikko<br>
</font><div><div></div><div><br>
------------------------------------------------------------------------------<br>
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA<br>
<a href="http://p.sf.net/sfu/rim-devcon-copy2" target="_blank">http://p.sf.net/sfu/rim-devcon-copy2</a><br>
_______________________________________________<br>
Kdenlive-devel mailing list<br>
<a href="mailto:Kdenlive-devel@lists.sourceforge.net" target="_blank">Kdenlive-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/kdenlive-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/kdenlive-devel</a><br>
</div></div></blockquote></div><br>