[PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

Daniel Krupp via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 9 06:16:28 PDT 2016


dkrupp updated this revision to Diff 70821.
dkrupp added a comment.

I tried to address all your comments.

1. computeExtentBegin() is greatly simplified.
2. addExtendSize() is simplified (scaleValue() function inlined)
3. new testcases added a) allocation and indexing of non-array element (int *ip =new int;) b) allocation of array with run-time size


https://reviews.llvm.org/D24307

Files:
  lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
  lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  test/Analysis/out-of-bounds-new.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24307.70821.patch
Type: text/x-patch
Size: 8771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160909/b6099533/attachment-0001.bin>


More information about the cfe-commits mailing list