about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/SpecialFunctionHandler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp
index 9904f052..281bdc59 100644
--- a/lib/Core/SpecialFunctionHandler.cpp
+++ b/lib/Core/SpecialFunctionHandler.cpp
@@ -654,10 +654,13 @@ void SpecialFunctionHandler::handleMakeSymbolic(ExecutionState &state,
       return;
     } 
 
+    // FIXME: Type coercion should be done consistently somewhere.
     bool res;
     bool success =
-      executor.solver->mustBeTrue(*s, EqExpr::create(arguments[1],
-                                                     mo->getSizeExpr()),
+      executor.solver->mustBeTrue(*s, 
+                                  EqExpr::create(ZExtExpr::create(arguments[1],
+                                                                  Context::get().getPointerWidth()),
+                                                 mo->getSizeExpr()),
                                   res);
     assert(success && "FIXME: Unhandled solver failure");