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

2016-09-19 Thread Phabricator via cfe-commits
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:

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

2016-09-19 Thread Daniel Krupp via cfe-commits
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

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

2016-09-17 Thread Artem Dergachev via 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 , +

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

2016-09-16 Thread Anna Zaks via cfe-commits
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

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

2016-09-12 Thread Daniel Krupp via cfe-commits
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

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

2016-09-09 Thread Daniel Krupp via 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

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

2016-09-09 Thread Daniel Krupp via cfe-commits
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

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

2016-09-08 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003 @@ +1002,3 @@ +// +ProgramStateRef MallocChecker::addExtentSize(CheckerContext , + const CXXNewExpr *NE, NoQ wrote: >

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

2016-09-08 Thread Artem Dergachev via cfe-commits
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

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

2016-09-08 Thread Daniel Krupp via cfe-commits
dkrupp added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003 @@ +1002,3 @@ +// +ProgramStateRef MallocChecker::addExtentSize(CheckerContext , + const CXXNewExpr *NE, xazax.hun wrote: >

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

2016-09-07 Thread Gábor Horváth via cfe-commits
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: >

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

2016-09-07 Thread Anna Zaks via cfe-commits
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

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

2016-09-07 Thread Daniel Krupp via cfe-commits
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