about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorAndrea Mattavelli <andreamattavelli@gmail.com>2017-02-13 11:10:14 +0000
committerDan Liew <delcypher@gmail.com>2017-02-14 13:47:59 +0000
commita787fc2aee9ced9478bc2a1bdd5336f6aa38b8bb (patch)
tree9901b17613d2d22c3910740b957f54250b0a203e
parent89e11e68ae336b6b4530c0e03b85519efa35a29d (diff)
downloadklee-a787fc2aee9ced9478bc2a1bdd5336f6aa38b8bb.tar.gz
Fixed assertion invocation: We were invoking bits64::truncateToNBits with a width greater than 64
-rw-r--r--include/klee/Expr.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/klee/Expr.h b/include/klee/Expr.h
index 4584ab0d..6c5351df 100644
--- a/include/klee/Expr.h
+++ b/include/klee/Expr.h
@@ -1080,7 +1080,10 @@ public:
   }
 
   static ref<ConstantExpr> create(uint64_t v, Width w) {
-    assert(v == bits64::truncateToNBits(v, w) && "invalid constant");
+#ifndef NDEBUG
+    if (w <= 64)
+      assert(v == bits64::truncateToNBits(v, w) && "invalid constant");
+#endif
     return alloc(v, w);
   }