diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-11-11 23:10:10 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-11-11 23:10:10 +0000 |
commit | 29836f9e4750f1ccb72c24f661c20686507f0063 (patch) | |
tree | 86cfbbac1195cbdc92eecabf5da79da2930ef05f /lib/Checker/BasicStore.cpp | |
parent | 8c457a8395676692225cd4c90bfb54d430199fdf (diff) |
RegionStore/BasicStore: do not return UndefinedVal for accesses to concrete addresses; instead return UnknownVal. This
leads it up to checkers (e.g., DereferenceChecker) to guard against illegal accesses (e.g., null dereferences).
Fixes PR 5272 and <rdar://problem/6839683>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/BasicStore.cpp')
-rw-r--r-- | lib/Checker/BasicStore.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Checker/BasicStore.cpp b/lib/Checker/BasicStore.cpp index f82e1b20be..5221ae3495 100644 --- a/lib/Checker/BasicStore.cpp +++ b/lib/Checker/BasicStore.cpp @@ -194,10 +194,9 @@ SVal BasicStoreManager::Retrieve(Store store, Loc loc, QualType T) { } case loc::ConcreteIntKind: - // Some clients may call GetSVal with such an option simply because - // they are doing a quick scan through their Locs (potentially to - // invalidate their bindings). Just return Undefined. - return UndefinedVal(); + // Support direct accesses to memory. It's up to individual checkers + // to flag an error. + return UnknownVal(); default: assert (false && "Invalid Loc."); |