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

Does svf implement type matching? #1507

Open
zz-fz-john opened this issue Aug 1, 2024 · 3 comments
Open

Does svf implement type matching? #1507

zz-fz-john opened this issue Aug 1, 2024 · 3 comments

Comments

@zz-fz-john
Copy link

I want to know whether svf has implemented type matching, which means that the return type and parameter type of the call site and the target function must be consistent.

@yuleisui
Copy link
Collaborator

yuleisui commented Aug 1, 2024

Which analysis you are referring to?

@zz-fz-john
Copy link
Author

Which analysis you are referring to?

AndersenWaveDiff

@yuleisui
Copy link
Collaborator

yuleisui commented Aug 6, 2024

For indirect call solving, yes.

assert(pag->isIndirectCallSites(cs) && "not an indirect callsite?");
/// discover indirect pointer target
for (PointsTo::iterator ii = target.begin(), ie = target.end();
ii != ie; ii++)
{
if(getNumOfResolvedIndCallEdge() >= Options::IndirectCallLimit())
{
wrnMsg("Resolved Indirect Call Edges are Out-Of-Budget, please increase the limit");
return;
}
if(ObjVar* objPN = SVFUtil::dyn_cast<ObjVar>(pag->getGNode(*ii)))
{
const MemObj* obj = pag->getObject(objPN);
if(obj->isFunction())
{
const SVFFunction* calleefun = SVFUtil::cast<SVFFunction>(obj->getValue());
const SVFFunction* callee = calleefun->getDefFunForMultipleModule();
if(SVFUtil::matchArgs(cs->getCallSite(), callee) == false)
continue;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants