Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix issue #1279) connect actual to formal vfgnode for full svfg #1282

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
{
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 @@
{
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 @@
{
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 @@
{
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 @@
{
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
Loading