NoQ added a comment.

In D64680#1584130 <https://reviews.llvm.org/D64680#1584130>, @Charusso wrote:

> Here is an example of the mentioned use-after-free by pointer-escaping as an 
> argument:
>  
> https://llvm.org/reports/scan-build/report-DeclBase.cpp-getFromVoidPointer-0-1.html#EndPath


Not sure how is this false positive related to that report, but this false 
positive looks super weird and i'd love to debug it more.

P.S. I think you should attach the report to Phabricator directly, as the link 
will expire as soon as these reports get regenerated.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:56-58
+    // If this checker does not model the allocation.
+    DoNothing,
+    // Reference to allocated memory.
----------------
Charusso wrote:
> NoQ wrote:
> > We already have `Escaped`, it's the same thing in practice.
> It is more strict than `Escaped`, also it made for the purpose of 
> `PSK_EscapeOther` to force out we lost the entire pointer and do not make 
> false warnings of use-after-free.
How exactly is it more strict? I.e., what warnings are getting suppressed by 
you that aren't going to be suppressed if you use `Escaped` instead?


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

https://reviews.llvm.org/D64680



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

Reply via email to