Skip to content

Commit

Permalink
connect actual to formal vfgnode for full svfg
Browse files Browse the repository at this point in the history
  • Loading branch information
jumormt committed Dec 12, 2023
1 parent a83aec2 commit 6604ef7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions svf/lib/Graphs/SVFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,20 +595,20 @@ void SVFG::getInterVFEdgesForIndirectCallSite(const CallICFGNode* callICFGNode,
{
const PAGNode *cs_arg = *csArgIt;
const PAGNode *fun_arg = *funArgIt;
if (fun_arg->isPointer() && cs_arg->isPointer())
if (isInterestedPAGNode(fun_arg) && isInterestedPAGNode(cs_arg))

Check warning on line 598 in svf/lib/Graphs/SVFG.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/Graphs/SVFG.cpp#L598

Added line #L598 was not covered by tests
getInterVFEdgeAtIndCSFromAPToFP(cs_arg, fun_arg, callICFGNode, csId, edges);
}
assert(funArgIt == funArgEit && "function has more arguments than call site");
if (callee->isVarArg())
{
NodeID varFunArg = pag->getVarargNode(callee);
const PAGNode* varFunArgNode = pag->getGNode(varFunArg);
if (varFunArgNode->isPointer())
if (isInterestedPAGNode(varFunArgNode))

Check warning on line 606 in svf/lib/Graphs/SVFG.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/Graphs/SVFG.cpp#L606

Added line #L606 was not covered by tests
{
for (; csArgIt != csArgEit; csArgIt++)
{
const PAGNode *cs_arg = *csArgIt;
if (cs_arg->isPointer())
if (isInterestedPAGNode(cs_arg))

Check warning on line 611 in svf/lib/Graphs/SVFG.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/Graphs/SVFG.cpp#L611

Added line #L611 was not covered by tests
getInterVFEdgeAtIndCSFromAPToFP(cs_arg, varFunArgNode, callICFGNode, csId, edges);
}
}
Expand All @@ -620,7 +620,7 @@ void SVFG::getInterVFEdgesForIndirectCallSite(const CallICFGNode* callICFGNode,
{
const PAGNode* cs_return = pag->getCallSiteRet(retICFGNode);
const PAGNode* fun_return = pag->getFunRet(callee);
if (cs_return->isPointer() && fun_return->isPointer())
if (isInterestedPAGNode(cs_return) && isInterestedPAGNode(fun_return))

Check warning on line 623 in svf/lib/Graphs/SVFG.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/Graphs/SVFG.cpp#L623

Added line #L623 was not covered by tests
getInterVFEdgeAtIndCSFromFRToAR(fun_return, cs_return, csId, edges);
}

Expand Down
8 changes: 4 additions & 4 deletions svf/lib/Graphs/VFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ void VFG::connectCallerAndCallee(const CallICFGNode* callBlockNode, const SVFFun
{
const PAGNode *cs_arg = *csArgIt;
const PAGNode *fun_arg = *funArgIt;
if (fun_arg->isPointer() && cs_arg->isPointer())
if (isInterestedPAGNode(cs_arg) && isInterestedPAGNode(fun_arg))
connectAParamAndFParam(cs_arg, fun_arg, callBlockNode, csId, edges);
}
assert(funArgIt == funArgEit && "function has more arguments than call site");
Expand All @@ -996,12 +996,12 @@ void VFG::connectCallerAndCallee(const CallICFGNode* callBlockNode, const SVFFun
{
NodeID varFunArg = pag->getVarargNode(callee);
const PAGNode* varFunArgNode = pag->getGNode(varFunArg);
if (varFunArgNode->isPointer())
if (isInterestedPAGNode(varFunArgNode))

Check warning on line 999 in svf/lib/Graphs/VFG.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/Graphs/VFG.cpp#L999

Added line #L999 was not covered by tests
{
for (; csArgIt != csArgEit; csArgIt++)
{
const PAGNode *cs_arg = *csArgIt;
if (cs_arg->isPointer())
if (isInterestedPAGNode(cs_arg))

Check warning on line 1004 in svf/lib/Graphs/VFG.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/Graphs/VFG.cpp#L1004

Added line #L1004 was not covered by tests
connectAParamAndFParam(cs_arg, varFunArgNode, callBlockNode, csId, edges);
}
}
Expand All @@ -1013,7 +1013,7 @@ void VFG::connectCallerAndCallee(const CallICFGNode* callBlockNode, const SVFFun
{
const PAGNode* cs_return = pag->getCallSiteRet(retBlockNode);
const PAGNode* fun_return = pag->getFunRet(callee);
if (cs_return->isPointer() && fun_return->isPointer())
if (isInterestedPAGNode(cs_return) && isInterestedPAGNode(fun_return))
connectFRetAndARet(fun_return, cs_return, csId, edges);
}
}
Expand Down

0 comments on commit 6604ef7

Please sign in to comment.