diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-09-01 23:00:46 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-09-01 23:00:46 +0000 |
commit | 1e4a32acfad6a9f4cf555fdbc5c6c44c558b9fcb (patch) | |
tree | b2f92470c4383d3cf141c4be7b5d707e56d90aee /lib/Checker/RegionStore.cpp | |
parent | 710672485039d3dd355748876299fff88e8ad84c (diff) |
Don't assert in the analyzer when analyze code does a byte load from a function's address. Fixes PR 8052.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/RegionStore.cpp')
-rw-r--r-- | lib/Checker/RegionStore.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp index 595fb6f19b..19945a7b3c 100644 --- a/lib/Checker/RegionStore.cpp +++ b/lib/Checker/RegionStore.cpp @@ -1087,6 +1087,10 @@ SVal RegionStoreManager::RetrieveElement(Store store, return ValMgr.makeIntVal(c, T); } } + + // Check for loads from a code text region. For such loads, just give up. + if (const CodeTextRegion *cR = dyn_cast<CodeTextRegion>(superR)) + return UnknownVal(); // Handle the case where we are indexing into a larger scalar object. // For example, this handles: |