NoQ added a comment.

In D71224#1778204 <https://reviews.llvm.org/D71224#1778204>, @xazax.hun wrote:

> I don't think this is a good enough model currently. The problem is that, it 
> does not play well with annotations. E.g. the checker can see a symbol 
> escaping, but it does not have a whole lot of information how. For example, 
> currently, there is no way to check if the output parameter through which the 
> escape happened was annotated somehow.


Hmm. If the function is annotated, it is hopefully "fully" annotated, or at 
least the programmer doesn't mind adding more annotations to it. Given that you 
have your `CallEvent` structure in `checkPointerEscape`, i hope you can easily 
see if there are any annotations at all on the function, and if so, suppress 
the current escape entirely. Or at least scan the annotated parameters and 
suppress the escape for them.

I guess it's still a problem if the *same* handle is also passed through a 
parameter that *cannot* be annotated (eg., as part of a structure passed into 
the call) and then actually getting released inside the call, but is it a real 
problem for you?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71224/new/

https://reviews.llvm.org/D71224



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to