Skip to content

Commit

Permalink
Move the variadic callee condition to matchArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
timmyyuan authored Mar 15, 2023
1 parent 8bca6b8 commit fc35775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions svf/lib/MemoryModel/PointerAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ void PointerAnalysis::resolveIndCalls(const CallICFGNode* cs, const PointsTo& ta

/// if the arg size does not match then we do not need to connect this parameter
/// unless the callee is a variadic function (the first parameter of variadic function is its paramter number)
if(!callee->isVarArg() && matchArgs(cs, callee) == false)
if(matchArgs(cs, callee) == false)
continue;

if(0 == getIndCallMap()[cs].count(callee))
Expand All @@ -434,7 +434,7 @@ void PointerAnalysis::resolveIndCalls(const CallICFGNode* cs, const PointsTo& ta
*/
bool PointerAnalysis::matchArgs(const CallICFGNode* cs, const SVFFunction* callee)
{
if(ThreadAPI::getThreadAPI()->isTDFork(cs->getCallSite()))
if(callee->isVarArg() || ThreadAPI::getThreadAPI()->isTDFork(cs->getCallSite()))
return true;
else
return SVFUtil::getSVFCallSite(cs->getCallSite()).arg_size() == callee->arg_size();
Expand Down

0 comments on commit fc35775

Please sign in to comment.