[PATCH] D52435: [analyzer] Prevent crashes in FindLastStoreBRVisitor

Umann Kristóf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 24 14:29:32 PDT 2018


Szelethus added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1760
+    if (const auto *SR = dyn_cast<SymbolicRegion>(L->getRegion()))
+      if (SR->getSymbol()->getType()->getPointeeType()->isVoidType())
+        FindLastStore = false;
----------------
george.karpenkov wrote:
> Szelethus wrote:
> > Does this also work for `void **`?
> The problem is `FindLastStoreBRVisitor` will later crash without this branch when attempting to dereference the region.
> This problem will not occur with `void**` because it's OK to dereference that.
Oh right, thanks!


Repository:
  rL LLVM

https://reviews.llvm.org/D52435





More information about the llvm-commits mailing list