[PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 7 14:06:30 PDT 2016
xazax.hun added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003
@@ +1002,3 @@
+//
+ProgramStateRef MallocChecker::addExtentSize(CheckerContext &C,
+ const CXXNewExpr *NE,
----------------
zaks.anna wrote:
> I am not sure this code belongs to the malloc checker since it only supports the array bounds checker. Is there a reason it's not part of that checker?
I think it is part of the malloc checker because it already does something very very similar to malloc, see the MallocMemAux function. So in fact, for the array bounds checker to work properly, the malloc checker should be turned on.
https://reviews.llvm.org/D24307
More information about the cfe-commits
mailing list