]> granicus.if.org Git - clang/commitdiff
Fix a serious bug in RegionStore: we got the new state with new store from
authorZhongxing Xu <xuzhongxing@gmail.com>
Mon, 9 Mar 2009 06:49:50 +0000 (06:49 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Mon, 9 Mar 2009 06:49:50 +0000 (06:49 +0000)
Bind() and BindStruct(), but we returned a state with the old store.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66409 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/RegionStore.cpp

index ba67829d0c74aa8547df7fd86ce49df155c6f810..9ef3fe84639843bf7b948dae97a7fed9e8b40f3f 100644 (file)
@@ -1046,8 +1046,6 @@ const GRState* RegionStoreManager::BindArray(const GRState* St,
   St = state.set<RegionDefaultValue>(R, NonLoc::MakeIntVal(getBasicVals(), 0, 
                                                            false));
 
-  Store store = St->getStore();
-
   ConstantArrayType* CAT = cast<ConstantArrayType>(T.getTypePtr());
 
   llvm::APSInt Size(CAT->getSize(), false);
@@ -1076,7 +1074,7 @@ const GRState* RegionStoreManager::BindArray(const GRState* St,
       St = Bind(St, loc::MemRegionVal(ER), V);
     }
 
-    return StateMgr.MakeStateWithStore(St, store);
+    return St;
   }
 
 
@@ -1098,7 +1096,7 @@ const GRState* RegionStoreManager::BindArray(const GRState* St,
       St = Bind(St, Loc::MakeVal(ER), *VI);
   }
 
-  return StateMgr.MakeStateWithStore(St, store);
+  return St;
 }
 
 const GRState*