[cfe-commits] r76283 - /cfe/trunk/test/Analysis/misc-ps-region-store.m

Ted Kremenek kremenek at apple.com
Fri Jul 17 22:02:37 PDT 2009


Author: kremenek
Date: Sat Jul 18 00:02:33 2009
New Revision: 76283

URL: http://llvm.org/viewvc/llvm-project?rev=76283&view=rev
Log:
Add test case for bug fix in r76262.

Modified:
    cfe/trunk/test/Analysis/misc-ps-region-store.m

Modified: cfe/trunk/test/Analysis/misc-ps-region-store.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps-region-store.m?rev=76283&r1=76282&r2=76283&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/misc-ps-region-store.m (original)
+++ cfe/trunk/test/Analysis/misc-ps-region-store.m Sat Jul 18 00:02:33 2009
@@ -125,3 +125,17 @@
     if ((int*)~0 != __gruev__) {}
   }
 }
+
+// This test case is a reduced case of a caching bug discovered by an
+// assertion failure in RegionStoreManager::BindArray.  Essentially the
+// DeclStmt is evaluated twice, but on the second loop iteration the
+// engine caches out.  Previously a false transition would cause UnknownVal
+// to bind to the variable, firing an assertion failure.  This bug was fixed
+// in r76262.
+void test_declstmt_caching() {
+again:
+  {
+    const char a[] = "I like to crash";
+    goto again;
+  }
+}





More information about the cfe-commits mailing list