diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-03-15 22:07:05 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-03-15 22:07:05 +0000 |
commit | 8b65de4a66813f50598c01f8e2e56adac8955f2b (patch) | |
tree | 5d2bd2801c1cbe3a8ab8ba35e693b28da97aaf74 /Analysis/ValueState.cpp | |
parent | c63e660882ff93841fa234d70ef6757038302b92 (diff) |
Disable creation of "ContentsOf" symbols. It was fundamentally broken on many
levels; eventually we will need a plug-in model (similar to GRTransferFuncs) to
represent symbolic memory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Analysis/ValueState.cpp')
-rw-r--r-- | Analysis/ValueState.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Analysis/ValueState.cpp b/Analysis/ValueState.cpp index 1fc4df9128..97df578eca 100644 --- a/Analysis/ValueState.cpp +++ b/Analysis/ValueState.cpp @@ -163,17 +163,29 @@ RVal ValueStateManager::GetRVal(ValueState* St, LVal LV, QualType T) { // FIXME: We should limit how far a "ContentsOf" will go... case lval::SymbolValKind: { + + + // FIXME: This is a broken representation of memory, and is prone + // to crashing the analyzer when addresses to symbolic values are + // passed through casts. We need a better representation of symbolic + // memory (or just memory in general); probably we should do this + // as a plugin class (similar to GRTransferFuncs). + +#if 0 const lval::SymbolVal& SV = cast<lval::SymbolVal>(LV); assert (T.getTypePtr()); // Punt on "symbolic" function pointers. if (T->isFunctionType()) - return UnknownVal(); - + return UnknownVal(); + if (T->isPointerType()) return lval::SymbolVal(SymMgr.getContentsOfSymbol(SV.getSymbol())); else return nonlval::SymbolVal(SymMgr.getContentsOfSymbol(SV.getSymbol())); +#endif + + return UnknownVal(); } default: |