This revision was automatically updated to reflect the committed changes.
Closed by commit rL281934: [analyzer] Calculate extent size for memory regions
allocated by new expression. (authored by xazax).
Changed prior to commit:
https://reviews.llvm.org/D24307?vs=70821=71874#toc
Repository:
dkrupp added a comment.
Thanks. Gabor, could you please merge this? I don't have commit right.
https://reviews.llvm.org/D24307
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Looks good!
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:291
@@ +290,3 @@
+ static ProgramStateRef addExtentSize(CheckerContext ,
+
zaks.anna added a comment.
I do not have any more comments; however, let's wait for @NoQ to review this as
well.
Thanks!
https://reviews.llvm.org/D24307
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
dkrupp marked 11 inline comments as done.
dkrupp added a comment.
issues fixed
https://reviews.llvm.org/D24307
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dkrupp added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1011
@@ +1010,3 @@
+// containing the elements.
+Region = (State->getSVal(NE, LCtx))
+ .getAsRegion()
MemRegion has now method called castAs<>, only
dkrupp added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:83
@@ -78,1 +82,3 @@
+ // we can assume that the region starts at 0.
+ if (!state->isNull(extentVal).isConstrained()) {
return UnknownVal();
NoQ
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003
@@ +1002,3 @@
+//
+ProgramStateRef MallocChecker::addExtentSize(CheckerContext ,
+ const CXXNewExpr *NE,
NoQ wrote:
>
NoQ added a comment.
Thanks for the patch! Not sure why, but i always have warm feelings for the
`MallocChecker` and wish it to improve.
Added minor style comments, joined the "where to put the code" debate.
Comment at: lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:69
dkrupp added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003
@@ +1002,3 @@
+//
+ProgramStateRef MallocChecker::addExtentSize(CheckerContext ,
+ const CXXNewExpr *NE,
xazax.hun wrote:
>
xazax.hun added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003
@@ +1002,3 @@
+//
+ProgramStateRef MallocChecker::addExtentSize(CheckerContext ,
+ const CXXNewExpr *NE,
zaks.anna wrote:
>
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003
@@ +1002,3 @@
+//
+ProgramStateRef MallocChecker::addExtentSize(CheckerContext ,
+ const CXXNewExpr *NE,
I am not sure this
dkrupp created this revision.
dkrupp added reviewers: xazax.hun, NoQ, dcoughlin, zaks.anna.
dkrupp added a subscriber: cfe-commits.
ArrayBoundChecker did not detect out of bounds memory access errors in case an
array was allocated by the new expression.
1. MallocChecker.cpp was updated to
13 matches
Mail list logo