[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;
----------------
ayartsev wrote:
> 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.

http://reviews.llvm.org/D8273

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list