about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorSean Bartell <yotann@yotann.org>2015-04-28 20:21:10 -0500
committerSean Bartell <yotann@yotann.org>2015-04-29 20:39:56 -0500
commitdff4069042e6f7b4bc7211b8e9ba3377ee01c33c (patch)
tree7f5bbf264099b6a650bd92e6f25e79c2ed7e04a2 /lib
parent6118403fa4315388946babd25be38a9524a5e2c5 (diff)
downloadklee-dff4069042e6f7b4bc7211b8e9ba3377ee01c33c.tar.gz
Fix assertion failure in getDirectCallTarget
It failed when the function being called is a bitcasted alias.
Diffstat (limited to 'lib')
-rw-r--r--lib/Module/ModuleUtil.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
index 5f7ed35e..1cf9c35c 100644
--- a/lib/Module/ModuleUtil.cpp
+++ b/lib/Module/ModuleUtil.cpp
@@ -446,7 +446,7 @@ Function *klee::getDirectCallTarget(CallSite cs) {
     return f;
   } else if (llvm::ConstantExpr *ce = dyn_cast<llvm::ConstantExpr>(v)) {
     if (ce->getOpcode()==Instruction::BitCast)
-      if (Function *f = dyn_cast<Function>(ce->getOperand(0)))
+      if (Function *f = dyn_cast<Function>(ce->getOperand(0)->stripPointerCasts()))
         return f;
 
     // NOTE: This assert may fire, it isn't necessarily a problem and