llvm-project/clang/lib/StaticAnalyzer/Checkers
Anna Zaks fe1eca5169 [analyzer] Assume escape is possible through system functions taking void*
The analyzer assumes that system functions will not free memory or modify the
arguments in other ways, so we assume that arguments do not escape when
those are called. However, this may lead to false positive leak errors. For
example, in code like this where the pointers added to the rb_tree are freed
later on:

		struct alarm_event *e = calloc(1, sizeof(*e));
<snip>

		rb_tree_insert_node(&alarm_tree, e);

Add a heuristic to assume that calls to system functions taking void*
arguments allow for pointer escape.

llvm-svn: 251449
2015-10-27 20:19:45 +00:00
..
AllocationDiagnostics.cpp [analyzer] Add experimental option "leak-diagnostics-reference-allocation". 2013-04-16 21:44:22 +00:00
AllocationDiagnostics.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
AnalyzerStatsChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
ArrayBoundChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ArrayBoundCheckerV2.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
BasicObjCFoundationChecks.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
BoolAssignmentChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
BuiltinFunctionChecker.cpp add __builtin_unpredictable and convert to metadata 2015-09-02 20:01:30 +00:00
CMakeLists.txt [Static Analyzer] General type checker based on dynamic type information. 2015-09-18 21:15:37 +00:00
CStringChecker.cpp [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire region. 2015-09-24 16:52:56 +00:00
CStringSyntaxChecker.cpp Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
CallAndMessageChecker.cpp SourceRanges are small and trivially copyable, don't them by reference. 2015-10-04 04:53:55 +00:00
CastSizeChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
CastToStructChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
CheckObjCDealloc.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
CheckObjCInstMethSignature.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
CheckSecuritySyntaxOnly.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
CheckSizeofPointer.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
CheckerDocumentation.cpp [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil. 2015-09-15 01:13:53 +00:00
Checkers.td [analyzer] Bug identification 2015-10-22 11:53:04 +00:00
ChrootChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ClangCheckers.cpp
ClangSACheckers.h Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
DeadStoresChecker.cpp Roll-back r250822. 2015-10-20 13:23:58 +00:00
DebugCheckers.cpp [analyzer] Bug identification 2015-10-22 11:53:04 +00:00
DereferenceChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
DirectIvarAssignment.cpp Switch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ pattern to range for loops. 2015-07-02 21:03:14 +00:00
DivZeroChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
DynamicTypeChecker.cpp [Static Analyzer] Fixed a false positive case in DynamicTypeChecker when dealing with forward declarations. 2015-09-18 23:38:57 +00:00
DynamicTypePropagation.cpp [Static Analyzer] General type checker based on dynamic type information. 2015-09-18 21:15:37 +00:00
ExprInspectionChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
FixedAddressChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
GenericTaintChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
IdenticalExprChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
InterCheckerAPI.h Add a missing forward def of CheckerManager. NFC. 2015-04-17 17:00:16 +00:00
IvarInvalidationChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
LLVMConventionsChecker.cpp Remove and forbid raw_svector_ostream::flush() calls. 2015-08-13 18:12:56 +00:00
LocalizationChecker.cpp [analyzer] Improve localizability checks for iOS / OS X. 2015-09-23 21:43:21 +00:00
MacOSKeychainAPIChecker.cpp Drop useless const in for-range loops. 2015-09-24 14:48:49 +00:00
MacOSXAPIChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
Makefile [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
MallocChecker.cpp [analyzer] Assume escape is possible through system functions taking void* 2015-10-27 20:19:45 +00:00
MallocOverflowSecurityChecker.cpp [analyzer] Discard malloc-overflow bug-report when a known size is malloc'ed. 2015-09-23 23:27:55 +00:00
MallocSizeofChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
NSAutoreleasePoolChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
NSErrorChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
NoReturnFunctionChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
NonNullParamChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
NullabilityChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ObjCAtSyncChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ObjCContainersASTChecker.cpp Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
ObjCContainersChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ObjCMissingSuperCallChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
ObjCSelfInitChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ObjCUnusedIVarsChecker.cpp Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
PointerArithChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
PointerSubChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
PthreadLockChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
RetainCountChecker.cpp Fix Clang-tidy modernize-use-nullptr warnings in source directories; other minor cleanups 2015-10-06 23:40:43 +00:00
ReturnPointerRangeChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ReturnUndefChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
SelectorExtras.h Use the new LLVM_END_WITH_NULL name 2014-11-04 01:13:43 +00:00
SimpleStreamChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
StackAddrEscapeChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
StreamChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
TaintTesterChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
TestAfterDivZeroChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
TraversalChecker.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
UndefBranchChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UndefCapturedBlockVarChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UndefResultChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UndefinedArraySubscriptChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UndefinedAssignmentChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UnixAPIChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UnreachableCodeChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
VLASizeChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
VirtualCallChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00