[cfe-commits] r48399 - /cfe/trunk/Analysis/ValueState.cpp
Ted Kremenek
kremenek at apple.com
Sat Mar 15 15:07:05 PDT 2008
Author: kremenek
Date: Sat Mar 15 17:07:05 2008
New Revision: 48399
URL: http://llvm.org/viewvc/llvm-project?rev=48399&view=rev
Log:
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.
Modified:
cfe/trunk/Analysis/ValueState.cpp
Modified: cfe/trunk/Analysis/ValueState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/ValueState.cpp?rev=48399&r1=48398&r2=48399&view=diff
==============================================================================
--- cfe/trunk/Analysis/ValueState.cpp (original)
+++ cfe/trunk/Analysis/ValueState.cpp Sat Mar 15 17:07:05 2008
@@ -163,17 +163,29 @@
// 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:
More information about the cfe-commits
mailing list