about summary refs log tree commit diff homepage
path: root/include
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2012-06-19 14:30:26 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2012-06-19 14:30:26 +0000
commit87d1428fb69c6c278ed2eb663cebdfb7c4c6d859 (patch)
treece70aff4dca10a4f5b9c390dc7f15a5cb8fa371a /include
parent2234ee6cdbe8b5a160ddba9d7e67c87a014eaa69 (diff)
downloadklee-87d1428fb69c6c278ed2eb663cebdfb7c4c6d859.tar.gz
Patch by Oscar Dustmann: "A pure-debug loop that only contained
assertions was intended to be prevented to being seen by the compiler
if and only if assertions were off altogher.  However, due to the
omission of the letter 'n' in ifndef, the loop was compiled if and
only if assertions were *ON*.  Thus the expression inside the
assertion, was *never* compiled, let alone checked in 'Foo+Asserts'
builds. Also, it was syntactically incorrect."



git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@158720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/klee/Expr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/klee/Expr.h b/include/klee/Expr.h
index 09b288a8..8d5306f8 100644
--- a/include/klee/Expr.h
+++ b/include/klee/Expr.h
@@ -599,10 +599,10 @@ public:
       stpInitialArray(0) {
     assert((isSymbolicArray() || constantValues.size() == size) &&
            "Invalid size for constant array!");
-#ifdef NDEBUG
+#ifndef NDEBUG
     for (const ref<ConstantExpr> *it = constantValuesBegin;
          it != constantValuesEnd; ++it)
-      assert(it->getWidth() == getRange() &&
+      assert((*it)->getWidth() == getRange() &&
              "Invalid initial constant value!");
 #endif
   }