[analyzer] Calculate extent size for memory regions allocated by new expression.
ArrayBoundChecker did not detect out of bounds memory access errors in case an array was allocated by the new expression. This patch resolves this issue. Patch by Daniel Krupp! Differential Revision: https://reviews.llvm.org/D24307 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281934 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp 5 additions, 12 deletionslib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
- lib/StaticAnalyzer/Checkers/MallocChecker.cpp 52 additions, 0 deletionslib/StaticAnalyzer/Checkers/MallocChecker.cpp
- test/Analysis/out-of-bounds-new.cpp 150 additions, 0 deletionstest/Analysis/out-of-bounds-new.cpp
Loading
Please register or sign in to comment