[cfe-commits] r58597 - /cfe/trunk/lib/Analysis/NOTES.TXT
Zhongxing Xu
xuzhongxing at gmail.com
Sun Nov 2 22:04:24 PST 2008
Author: zhongxingxu
Date: Mon Nov 3 00:04:23 2008
New Revision: 58597
URL: http://llvm.org/viewvc/llvm-project?rev=58597&view=rev
Log:
Add some notes for SCA.
Modified:
cfe/trunk/lib/Analysis/NOTES.TXT
Modified: cfe/trunk/lib/Analysis/NOTES.TXT
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/NOTES.TXT?rev=58597&r1=58596&r2=58597&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/NOTES.TXT (original)
+++ cfe/trunk/lib/Analysis/NOTES.TXT Mon Nov 3 00:04:23 2008
@@ -22,3 +22,34 @@
//===----------------------------------------------------------------------===//
Remove PersistentSValPairs and PersistentSVals?
+
+//===----------------------------------------------------------------------===//
+
+If the pointer is symbolic, we should expand it to a full region with symbolic
+values. This can eliminate the following false warning.
+
+struct file {
+ int lineno;
+};
+
+struct file *fileinfo;
+
+void f10() {
+ int i;
+ int *p = 0;
+
+ if (fileinfo->lineno)
+ p = &i;
+
+ if (fileinfo->lineno)
+ *p = 3; // false warning
+}
+
+Now we return a symbolic region for fileinfo->lineno in RegionStore. Loading
+from it returns an UnknownVal. Therefore the path condition is not recorded.
+
+Where should we call this ExpandSymbolicPointer method? Perhaps in
+GRExprEngine::VisitMemberExpr().
+
+Problem: The base expr of MemberExpr can be in various form. How do we get the
+pointer varregion(or other kind of region) to be changed?
More information about the cfe-commits
mailing list