SUPA icon indicating copy to clipboard operation
SUPA copied to clipboard

SUPA/SVF fails to resolve pointer-to-member function pointer

Open mustakimur opened this issue 6 years ago • 0 comments

The issue is most probably from SVF project, but still, I have found it from SUPA, I am reporting it here.

If there is an indirect call to a class member function using pointer-to-member function pointer, the analysis fails to resolve it.

class A {
public:
  int f();
  int (A::*x)();
};

int A::f() { return 1; }

void ctx() {
  A a;
  a.x = &A::f;
  (a.*(a.x))();
}

The result it shows:

##<> Source Loc: 
Ptr 4295 		PointsTo: {empty}

with /llvm-svf-src/Release-build/bin/dvf -cxt -query=funptr -maxcxt=5 -flowbg=10000 -cxtbg=10000 -cpts -print-query-pts sample.bc

It is expected to have _ZN1A1fEv as points-to.

mustakimur avatar Jan 11 '19 16:01 mustakimur