llvm-project/clang/lib/StaticAnalyzer/Core
Devin Coughlin 0da2e93345 [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire region.
Change the analyzer's modeling of memcpy to be more precise when copying into fixed-size
array fields. With this change, instead of invalidating the entire containing region the
analyzer now invalidates only offsets for the array itself when it can show that the
memcpy stays within the bounds of the array.

This addresses false positive memory leak warnings of the kind reported by
krzysztof in https://llvm.org/bugs/show_bug.cgi?id=22954

(This is the second attempt, now with assertion failures resolved.)

A patch by Pierre Gousseau!

Differential Revision: http://reviews.llvm.org/D12571

llvm-svn: 248516
2015-09-24 16:52:56 +00:00
..
APSIntType.cpp [analyzer] Teach constraint managers about unsigned comparisons. 2013-03-23 01:21:33 +00:00
AnalysisManager.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
AnalyzerOptions.cpp [Static Analyzer] Properly cash the configuration option for lambda support. 2015-09-11 21:19:39 +00:00
BasicValueFactory.cpp Fix a crash by division by zero in analyzer 2015-06-25 14:06:02 +00:00
BlockCounter.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
BugReporter.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
BugReporterVisitors.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
CMakeLists.txt [Static Analyzer] Properly clean up the dynamic type information for dead regions. 2015-09-11 17:19:57 +00:00
CallEvent.cpp [Static Analyzer] Properly clean up the dynamic type information for dead regions. 2015-09-11 17:19:57 +00:00
Checker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
CheckerContext.cpp Rename the non-coding style conformant functions in namespace Builtins 2015-08-06 01:01:12 +00:00
CheckerHelpers.cpp Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
CheckerManager.cpp Silencing a -Wreturn-type warning; NFC. 2015-09-15 14:11:32 +00:00
CheckerRegistry.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
CommonBugCategories.cpp [analyzer] Replace bug category magic strings with shared constants, take 2. 2013-10-04 00:25:24 +00:00
ConstraintManager.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
CoreEngine.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
DynamicTypeMap.cpp [Static Analyzer] Properly clean up the dynamic type information for dead regions. 2015-09-11 17:19:57 +00:00
Environment.cpp Analyzer: Teach analyzer how to handle TypeTraitExpr 2015-09-22 19:33:15 +00:00
ExplodedGraph.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
ExprEngine.cpp [analyzer] Create one state for a range switch case instead of multiple. 2015-09-22 20:31:19 +00:00
ExprEngineC.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
ExprEngineCXX.cpp [Static Analyzer] Lambda support. 2015-09-11 16:55:01 +00:00
ExprEngineCallAndReturn.cpp [analyzer] Add -analyzer-config option for function size the inliner considers as large 2015-09-11 20:14:05 +00:00
ExprEngineObjC.cpp [analyzer] Restore behavior change introduced by r247657. 2015-09-15 03:28:27 +00:00
FunctionSummary.cpp [analyzer] Use inline storage in the FunctionSummary DenseMap. 2013-04-02 00:26:26 +00:00
HTMLDiagnostics.cpp Don't use std::errc. 2015-06-13 17:23:13 +00:00
Makefile [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
MemRegion.cpp [Static Analyzer] Lambda support. 2015-09-11 16:55:01 +00:00
PathDiagnostic.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
PlistDiagnostics.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
PrettyStackTraceLocationContext.h Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
ProgramState.cpp [Static Analyzer] Properly clean up the dynamic type information for dead regions. 2015-09-11 17:19:57 +00:00
RangeConstraintManager.cpp [analyzer] Create one state for a range switch case instead of multiple. 2015-09-22 20:31:19 +00:00
RegionStore.cpp [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire region. 2015-09-24 16:52:56 +00:00
SValBuilder.cpp Analyzer: Teach analyzer how to handle TypeTraitExpr 2015-09-22 19:33:15 +00:00
SVals.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
SimpleConstraintManager.cpp [analyzer] Create one state for a range switch case instead of multiple. 2015-09-22 20:31:19 +00:00
SimpleConstraintManager.h [analyzer] Create one state for a range switch case instead of multiple. 2015-09-22 20:31:19 +00:00
SimpleSValBuilder.cpp [analyzer] A fix for substraction of an integer from a pointer. 2015-09-18 19:13:22 +00:00
Store.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
SubEngine.cpp
SymbolManager.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00