@@ -183,6 +183,8 @@ class Expr {
183183
184184 static const Width Fl80 = 80 ;
185185
186+ static const Width TaintWidth = 64 ;
187+
186188 enum States { Undefined, True, False };
187189
188190 enum Kind {
@@ -414,6 +416,8 @@ class Expr {
414416 static ref<ConstantExpr> createFalse ();
415417
416418 static ref<ConstantExpr> createEmptyTaint ();
419+ static ref<Expr> combineTaints (const ref<Expr> &taintL,
420+ const ref<Expr> &taintR);
417421
418422 // / Create a little endian read of the given type at offset 0 of the
419423 // / given object.
@@ -1684,9 +1688,8 @@ class PointerExpr : public NonConstantExpr {
16841688 ref<Expr> value;
16851689 ref<Expr> taint;
16861690
1687- static ref<Expr>
1688- alloc (const ref<Expr> &b, const ref<Expr> &v,
1689- const ref<Expr> &t = createEmptyTaint()) {
1691+ static ref<Expr> alloc (const ref<Expr> &b, const ref<Expr> &v,
1692+ const ref<Expr> &t = createEmptyTaint()) {
16901693 ref<Expr> r (new PointerExpr (b, v, t));
16911694 r->computeHash ();
16921695 r->computeHeight ();
@@ -1734,8 +1737,8 @@ class PointerExpr : public NonConstantExpr {
17341737
17351738 bool isKnownValue () const { return getBase ()->isZero (); }
17361739
1737- ref<Expr > combineTaints (const ref<PointerExpr> &RHS) {
1738- return OrExpr::create (getTaint (), RHS->getTaint ());
1740+ ref<ConstantExpr > combineTaints (const ref<PointerExpr> &RHS) {
1741+ return Expr::combineTaints (getTaint (), RHS->getTaint ());
17391742 }
17401743
17411744 ref<Expr> Add (const ref<PointerExpr> &RHS);
@@ -1783,9 +1786,9 @@ class ConstantPointerExpr : public PointerExpr {
17831786 r->computeHeight ();
17841787 return r;
17851788 }
1786- static ref<Expr>
1787- create ( const ref<ConstantExpr> &b, const ref<ConstantExpr> &v,
1788- const ref<ConstantExpr> &t = createEmptyTaint());
1789+ static ref<Expr> create ( const ref<ConstantExpr> &b,
1790+ const ref<ConstantExpr> &v,
1791+ const ref<ConstantExpr> &t = createEmptyTaint());
17891792
17901793 Kind getKind () const { return Expr::ConstantPointer; }
17911794
0 commit comments