[cfe-dev] Possible trivial correction to test/Analysis/malloc-annotations.c
ganna at apple.com
Thu Apr 18 11:21:17 PDT 2013
>From the name of the function, 'ownership_takes' does seem to be the better match.
Note, that the checker that uses the annotation (MallocOptimistic) is in alpha state and probably needs a major redesign and productization. The functionality that is there now has not been tested much. Currently, that checker assumes that every function which might free memory will be annotated. This applies to functions that free memory indirectly, by calling another function. This greatly limits applicability of the checker.
We are thinking of augmenting the MallocPessimistic, which assumes that any unknown function can free memory, with annotations on functions which the user has more info about, instead of reviving the MallocOptimistic checker.
On Apr 18, 2013, at 10:02 AM, Bruce Stephens <bruce.r.stephens at gmail.com> wrote:
> Shouldn't myfreeBoth be annotated with
> __attribute((ownership_takes(malloc, 1, 2))) rather than
> (Makes no practical difference, but logically it makes sense?)
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev