<div dir="ltr">Having actually annotated a large codebase (since I wrote the annotations in the first place)... yes, it is a lot of work.  In our case, months of work on 77 MLoC, but the result was several thousand potential crash bugs resolved and a measurable improvement in support workload for the product.<div>
<br></div><div style>I was going to work on annotation deduction, so the analyser could work out if there was a missing annotation and tell you what it should be (with a fixit, of course), but having changed jobs I no longer have time to work on that.  It is feasible, however.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 19, 2013 at 6:34 AM,  <span dir="ltr"><<a href="mailto:bruce.r.stephens@gmail.com" target="_blank">bruce.r.stephens@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Anna Zaks <<a href="mailto:ganna-2kanFRK1NckAvxtiuMwx3w@public.gmane.org">ganna-2kanFRK1NckAvxtiuMwx3w@public.gmane.org</a>> writes:<br>

<br>
> Note, that the checker that uses the annotation (MallocOptimistic) is<br>
> in alpha state and probably needs a major redesign and<br>
> productization. The functionality that is there now has not been<br>
> tested much. Currently, that checker assumes that every function which<br>
> might free memory will be annotated. This applies to functions that<br>
> free memory indirectly, by calling another function. This greatly<br>
> limits applicability of the checker.<br>
><br>
> We are thinking of augmenting the MallocPessimistic, which assumes<br>
> that any unknown function can free memory, with annotations on<br>
> functions which the user has more info about, instead of reviving the<br>
> MallocOptimistic checker.<br>
<br>
</div>Agreed, yes. The default malloc checker (MallocPessimistic, IIUC) works<br>
well. Not perfect, of course, but very useful.<br>
<br>
By the looks of it the annotated malloc checker would require<br>
unrealistic amounts of annotation to bring the false positives down<br>
enough for it to be useful at least in the codebase I'm working<br>
on. Starting from something similar to MallocPessimistic ought to<br>
produce something useful, much as I like (in principle) the idea of<br>
annotating functions with ownership information.<br>
<br>
[...]<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div>