[PATCH] D44281: [analyzer] Suppress more MallocChecker positives in reference counting pointer destructors.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 8 17:10:38 PST 2018


NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet.
Herald added subscribers: cfe-commits, rnkovacs.

https://reviews.llvm.org/D43791 wasn't quite enough because we often run out of inlining stack depth limit and for that reason fail to see the atomics we're looking for.

Add a more straightforward false positive suppression that is based on the name of the class. I.e. if we're releasing a pointer in a destructor of a "something shared/intrusive/reference/counting something ptr/pointer something", then any use-after-free or double-free that occurs later would likely be a false positive.


Repository:
  rC Clang

https://reviews.llvm.org/D44281

Files:
  lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  test/Analysis/NewDelete-atomics.cpp
  test/Analysis/NewDelete-refptr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44281.137677.patch
Type: text/x-patch
Size: 7105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180309/a083eb79/attachment-0001.bin>


More information about the cfe-commits mailing list