[PATCH] [analyzer] Implementation of potential undefbehavior.ZeroAllocDereference checker.
anton.yartsev at gmail.com
Sat Mar 21 07:19:37 PDT 2015
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:889
@@ +888,3 @@
+ const RefState *RS = State->get<RegionState>(Sym);
+ if (!RS || !RS->isAllocated())
+ return State;
> zaks.anna wrote:
> > It should not be possible to have non allocated symbol here.. Is it? Maybe we should assert?
> Agree, done!
Pardon, currently zero-allocated realloc do not attach a RefState so it is still early to assert for now.
More information about the cfe-commits