Skip to content

Commit 1c9a1dd

Browse files
committed
Fix isVirtualCallSite: Arg0 must be pointer type
1 parent ed537a3 commit 1c9a1dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SVF-FE/CPPUtil.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ bool cppUtil::isVirtualCallSite(CallSite cs)
263263
if (cs.getCalledFunction() != nullptr || cs.arg_empty())
264264
return false;
265265

266+
// the first argument (this pointer) must be a pointer type and must be a class name
267+
if (cs.getArgOperand(0)->getType()->isPointerTy() == false)
268+
return false;
269+
266270
const Value *vfunc = cs.getCalledValue();
267271
if (const LoadInst *vfuncloadinst = SVFUtil::dyn_cast<LoadInst>(vfunc))
268272
{

0 commit comments

Comments
 (0)