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

Can DVF's flow sensitive points-to analysis give me the results at a given program statement? #1583

Open
taptipalit opened this issue Oct 30, 2024 · 0 comments

Comments

@taptipalit
Copy link

Is there a way to dump all points-to relationships at an arbitrary program statement when using dvf's flow sensitive points-to analysis? For example, in the following code snippet, I want to dump pts(p) at the program statement marked HERE (and hopefully get {b} and not {a, b} as the previous strong update overwrites the stale points-to relationship p -> a).

Code snippet:

void fn() {
  int a, b;
  int *p;
  int **pp;
  pp = &p;
  *pp = &a;
  // 10,000 statements later
  *pp = &b; // <--- HERE
}

I'm running dvf -dfs -print-query-pts -flow-bg=10000 -query=all minimum.ll, but for some reason it shows an empty points-to set (I think I'm using incorrect command line options?)

##<pp> Source Loc: { "ln": 4, "fl": "minimum.c" }
Ptr 14    PointsTo: { 15 }

!!Target NodeID 15   [<pp> Source Loc: { "ln": 4, "fl": "minimum.c" }]
##<pp> Source Loc: { "ln": 4, "fl": "minimum.c" }
Ptr 15    PointsTo: {empty}

However, when I run it with wpa I can get both {a, b}.

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

1 participant