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 | 843c53828fa7ae1f6e121d9ab5352054173ea31d (patch) | |
| tree | 9a7ba3d85ca67afc2b3fff3ea6afe48f05a1c956 /clang/lib/Checker/BasicStore.cpp | |
| parent | 667429d6b184a00e039de025c8f6fc61b2188b71 (diff) | |
| download | bcm5719-llvm-843c53828fa7ae1f6e121d9ab5352054173ea31d.tar.gz bcm5719-llvm-843c53828fa7ae1f6e121d9ab5352054173ea31d.zip | |
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>.
llvm-svn: 118852
Diffstat (limited to 'clang/lib/Checker/BasicStore.cpp')
| -rw-r--r-- | clang/lib/Checker/BasicStore.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Checker/BasicStore.cpp b/clang/lib/Checker/BasicStore.cpp index f82e1b20be9..5221ae3495f 100644 --- a/clang/lib/Checker/BasicStore.cpp +++ b/clang/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."); |

