[cfe-commits] r74407 - in /cfe/trunk/lib/Analysis: BasicStore.cpp RegionStore.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Sun Jun 28 03:16:26 PDT 2009
Author: zhongxingxu
Date: Sun Jun 28 05:16:11 2009
New Revision: 74407
URL: http://llvm.org/viewvc/llvm-project?rev=74407&view=rev
Log:
Do not crash on binding concrete integer location.
Modified:
cfe/trunk/lib/Analysis/BasicStore.cpp
cfe/trunk/lib/Analysis/RegionStore.cpp
Modified: cfe/trunk/lib/Analysis/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicStore.cpp?rev=74407&r1=74406&r2=74407&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/BasicStore.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicStore.cpp Sun Jun 28 05:16:11 2009
@@ -319,6 +319,9 @@
}
Store BasicStoreManager::BindInternal(Store store, Loc loc, SVal V) {
+ if (isa<loc::ConcreteInt>(loc))
+ return store;
+
const MemRegion* R = cast<loc::MemRegionVal>(loc).getRegion();
ASTContext &C = StateMgr.getContext();
Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=74407&r1=74406&r2=74407&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Sun Jun 28 05:16:11 2009
@@ -1074,6 +1074,9 @@
}
const GRState *RegionStoreManager::Bind(const GRState *state, Loc L, SVal V) {
+ if (isa<loc::ConcreteInt>(L))
+ return state;
+
// If we get here, the location should be a region.
const MemRegion* R = cast<loc::MemRegionVal>(L).getRegion();
More information about the cfe-commits
mailing list