diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-06-28 10:16:11 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-06-28 10:16:11 +0000 |
| commit | d260db1238b56d0e6f04c490e44cddace5702300 (patch) | |
| tree | 5db76236478b84cc9969946eb344fea31d0501b2 | |
| parent | f7a6de3a12545d51f48aebdad39b03720c43a084 (diff) | |
| download | bcm5719-llvm-d260db1238b56d0e6f04c490e44cddace5702300.tar.gz bcm5719-llvm-d260db1238b56d0e6f04c490e44cddace5702300.zip | |
Do not crash on binding concrete integer location.
llvm-svn: 74407
| -rw-r--r-- | clang/lib/Analysis/BasicStore.cpp | 3 | ||||
| -rw-r--r-- | clang/lib/Analysis/RegionStore.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Analysis/BasicStore.cpp b/clang/lib/Analysis/BasicStore.cpp index 44831f68e6a..7210d2c6794 100644 --- a/clang/lib/Analysis/BasicStore.cpp +++ b/clang/lib/Analysis/BasicStore.cpp @@ -319,6 +319,9 @@ SVal BasicStoreManager::Retrieve(const GRState *state, Loc loc, QualType T) { } 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(); diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index d45048de1a4..65864196c7d 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/lib/Analysis/RegionStore.cpp @@ -1074,6 +1074,9 @@ Store RegionStoreManager::Remove(Store store, Loc L) { } 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(); |

