about summary refs log tree commit diff homepage
path: root/include
diff options
context:
space:
mode:
authorHristina Palikareva <h.palikareva@imperial.ac.uk>2014-04-23 20:20:33 +0100
committerHristina Palikareva <h.palikareva@imperial.ac.uk>2014-04-24 12:05:01 +0100
commit2795655e567c3cdbfe3d4815edd83b4f4cdbb542 (patch)
tree80400e7fa9b69edd1ecdb3600ca88244f533c389 /include
parentaa8cc67c0d8c16388ebe670757327a81f774d0ee (diff)
downloadklee-2795655e567c3cdbfe3d4815edd83b4f4cdbb542.tar.gz
Asserting that update lists have non-NULL roots within ReadExpr objects (update
lists can have NULL roots, e.g. in MemoryObject instances with concrete
contents, where root is allocated lazily only when the updates are required).
Also checking whether array updates are typed correctly in UpdateList::extend()
rather than in the constructor of UpdateNode (only for update lists with
non-NULL roots).
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 240c6220..a302591a 100644
--- a/include/klee/Expr.h
+++ b/include/klee/Expr.h
@@ -675,7 +675,7 @@ public:
   
   static ref<Expr> create(const UpdateList &updates, ref<Expr> i);
   
-  Width getWidth() const { return updates.root ? updates.root->getRange() : Expr::Int8; }
+  Width getWidth() const { assert(updates.root); return updates.root->getRange(); }
   Kind getKind() const { return Read; }
   
   unsigned getNumKids() const { return numKids; }
@@ -691,7 +691,7 @@ public:
 
 private:
   ReadExpr(const UpdateList &_updates, const ref<Expr> &_index) : 
-    updates(_updates), index(_index) {}
+    updates(_updates), index(_index) { assert(updates.root); }
 
 public:
   static bool classof(const Expr *E) {