llvm-project/clang/lib/StaticAnalyzer/Core
Balázs Kéri dcc04e09cf [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.
Summary:
The kernel kmalloc function may return a constant value ZERO_SIZE_PTR
if a zero-sized block is allocated. This special value is allowed to
be passed to kfree and should produce no warning.

This is a simple version but should be no problem. The macro is always
detected independent of if this is a kernel source code or any other
code.

Reviewers: Szelethus, martong

Reviewed By: Szelethus, martong

Subscribers: rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76830
2020-03-30 10:33:14 +02:00
..
APSIntType.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AnalysisManager.cpp [analyzer] CheckerContext: Make the Preprocessor available 2020-01-30 17:05:52 +01:00
AnalyzerOptions.cpp Revert "Convert a reachable llvm_unreachable into an assert." 2020-03-24 16:06:14 -04:00
BasicValueFactory.cpp [cxx2a] P1236R1: the validity of a left shift does not depend on the 2019-06-25 01:45:26 +00:00
BlockCounter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BugReporter.cpp [analyzer] Assign truly stable identifiers to exploded nodes. 2019-10-17 23:10:09 +00:00
BugReporterVisitors.cpp [analyzer] DynamicSize: Remove 'getExtent()' from regions 2020-01-30 16:05:18 +01:00
CMakeLists.txt [analyzer][NFC] Move the text output type to its own file, move code to PathDiagnosticConsumer creator functions 2020-03-23 21:50:40 +01:00
CallEvent.cpp [analyzer] Add support for CXXInheritedCtorInitExpr. 2020-02-25 18:37:23 +03:00
Checker.cpp [analyzer][NFC] Fix inconsistent references to checkers as "checks" 2019-09-12 19:09:24 +00:00
CheckerContext.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CheckerHelpers.cpp [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR. 2020-03-30 10:33:14 +02:00
CheckerManager.cpp Reland "[analyzer][NFC] Tie CheckerRegistry to CheckerManager, allow CheckerManager to be constructed for non-analysis purposes" 2020-03-26 16:12:38 +01:00
CommonBugCategories.cpp [analyzer] CERT: POS34-C 2020-02-19 18:12:19 +01:00
ConstraintManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CoreEngine.cpp [Analyzer][NFC] Change parameter of NoteTag lambdas to PathSensitiveBugReport 2020-03-10 11:30:28 +01:00
DynamicSize.cpp [analyzer] DynamicSize: Remove 'getSizeInElements()' from store 2020-01-30 16:51:48 +01:00
DynamicType.cpp [analyzer] CastValueChecker: Provide DynamicTypeMap with pointer types only. 2019-08-23 03:24:01 +00:00
Environment.cpp [analyzer] pr43036: Fix support for operator 'sizeof...'. 2019-08-28 18:44:35 +00:00
ExplodedGraph.cpp [analyzer] Assign truly stable identifiers to exploded nodes. 2019-10-17 23:10:09 +00:00
ExprEngine.cpp Suppress a few -Wunreachable-code warnings. 2020-03-25 13:55:42 -04:00
ExprEngineC.cpp [analyzer] Escape symbols conjured into specific regions during a conservative EvalCall 2019-12-11 11:44:10 -08:00
ExprEngineCXX.cpp [analyzer] Add support for CXXInheritedCtorInitExpr. 2020-02-25 18:37:23 +03:00
ExprEngineCallAndReturn.cpp [analyzer] Add support for CXXInheritedCtorInitExpr. 2020-02-25 18:37:23 +03:00
ExprEngineObjC.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FunctionSummary.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
HTMLDiagnostics.cpp [analyzer][NFC] Move the text output type to its own file, move code to PathDiagnosticConsumer creator functions 2020-03-23 21:50:40 +01:00
IssueHash.cpp Make SourceManager::createFileID(UnownedTag, ...) take a const llvm::MemoryBuffer* 2019-04-04 21:06:41 +00:00
LoopUnrolling.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
LoopWidening.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MemRegion.cpp [analyzer] AnalysisDeclContext: Refactor and documentation 2020-03-04 07:06:54 +01:00
PlistDiagnostics.cpp [analyzer][NFC] Move the text output type to its own file, move code to PathDiagnosticConsumer creator functions 2020-03-23 21:50:40 +01:00
PrettyStackTraceLocationContext.h [analyzer] print() JSONify: Environment implementation 2019-05-29 15:36:58 +00:00
ProgramState.cpp Revert "[analyzer] Keep track of escaped locals" 2019-12-10 16:42:03 -08:00
RangeConstraintManager.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
RangedConstraintManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegionStore.cpp [analyzer] DynamicSize: Remove 'getSizeInElements()' from store 2020-01-30 16:51:48 +01:00
SMTConstraintManager.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
SValBuilder.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SVals.cpp [analyzer] print() JSONify: SVal implementation 2019-05-29 18:38:52 +00:00
SarifDiagnostics.cpp [analyzer][NFC] Move the text output type to its own file, move code to PathDiagnosticConsumer creator functions 2020-03-23 21:50:40 +01:00
SimpleConstraintManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SimpleSValBuilder.cpp Fix parameter name comments using clang-tidy. NFC. 2019-07-16 04:46:31 +00:00
Store.cpp [analysis] Re-discard type sugar when casting values retrieved from the Store. 2019-12-18 18:00:57 -08:00
SubEngine.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SymbolManager.cpp [analyzer] Add support for CXXInheritedCtorInitExpr. 2020-02-25 18:37:23 +03:00
TextDiagnostics.cpp [analyzer][NFC] Move the text output type to its own file, move code to PathDiagnosticConsumer creator functions 2020-03-23 21:50:40 +01:00
WorkList.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00