We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi Yulei, As we discussed in SVF-tools/SVF#109, I tried SUPA for context-sensitive analysis with code below:
#include <stdlib.h> void my_malloc(char ** p,unsigned size){ *p = malloc(size); } void use1(char *s1){ char c1 = s1[0]; } void use2(char *s2){ char c2 = s2[1]; } void f(void){ char *p1,*p2,*p3,*p4,*p5,*p6; p1 = malloc(1); p2 = malloc(2); my_malloc(&p3,3); my_malloc(&p4,4); p5 = p3; p6 = p4; use1(p5); use2(p6); }
I used wpa to get the constraint graph as below.
Then I used
dvf -cxt -query=all -maxcxt=3 -cxtbg=10000 -flowbg=10000 -print-query-pts alloc_test.bc
to get points to result.
...... ##<> Source Loc: Ptr 81 PointsTo: { 18 } !!Target NodeID 18 [<call> Source Loc: ] ##<> Source Loc: Ptr 83 PointsTo: { 18 } !!Target NodeID 18 [<call> Source Loc: ] ##<> Source Loc: Ptr 85 PointsTo: { 18 } !!Target NodeID 18 [<call> Source Loc: ] ##<> Source Loc: Ptr 87 PointsTo: { 18 } !!Target NodeID 18 [<call> Source Loc: ]
From the result above, I saw Ptr 81,83,85,87 all point to PagNode 18, which makes them aliases. But pointer p5 and p6 should not be aliases.
Is that supposed to be right? Or am I doing something wrong here?
The text was updated successfully, but these errors were encountered:
-print-query-pts will print insensitive results. For context-sensitive analysis please use https://github.com/SVF-tools/SVF/blob/ab806b876e1e6ec1e7fb32eb5052881aa62775d8/include/MemoryModel/PointerAnalysis.h#L374 to obtain points-to targets together with their calling contexts.
-print-query-pts
For your case, you may wish to refer to alias function to get the non-alias results:
alias
SUPA/lib/DDA/DDAPass.cpp
Line 279 in 3124902
Sorry, something went wrong.
No branches or pull requests
Hi Yulei,
As we discussed in SVF-tools/SVF#109, I tried SUPA for context-sensitive analysis with code below:
I used wpa to get the constraint graph as below.
![image](https://user-images.githubusercontent.com/5728515/48062007-b1278c00-e1fb-11e8-83f1-f0792da43cf6.png)
Then I used
to get points to result.
From the result above, I saw Ptr 81,83,85,87 all point to PagNode 18, which makes them aliases. But pointer p5 and p6 should not be aliases.
Is that supposed to be right? Or am I doing something wrong here?
The text was updated successfully, but these errors were encountered: