]> granicus.if.org Git - clang/commitdiff
Only loc::MemRegionVal can be modified. This avoids crashing in RegionStore when...
authorZhongxing Xu <xuzhongxing@gmail.com>
Mon, 27 Oct 2008 09:00:08 +0000 (09:00 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Mon, 27 Oct 2008 09:00:08 +0000 (09:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58233 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRSimpleVals.cpp

index a2a59f3e929b27d393fba5867c522b158fc170bb..48b25a71f9df04d8c23680c4514c90982dc69b2a 100644 (file)
@@ -369,7 +369,7 @@ void GRSimpleVals::EvalCall(ExplodedNodeSet<GRState>& Dst,
 
     SVal V = StateMgr.GetSVal(St, *I);
     
-    if (isa<Loc>(V))
+    if (isa<loc::MemRegionVal>(V))
       St = StateMgr.SetSVal(St, cast<Loc>(V), UnknownVal());
     else if (isa<nonloc::LocAsInteger>(V))
       St = StateMgr.SetSVal(St, cast<nonloc::LocAsInteger>(V).getLoc(),