How to make reachableMethods() more precise? #1982
Unanswered
BManasa-uber
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to use Soot Spark for generating static call graphs. My aim is to use the call graphs in the following way -
If a method is changed in the code, I want to backtrack along the call graph to figure out all the methods that it is going to affect.
Now, the case where I'm facing a issue is as follows -
Consider the case where I have a parent class A (methods - process(), handle()) and 2 classes, B and C inherit it.
B and C override the method handle() but not process().
Consider 2 cases:
Case 1: We only call b.process() in the code -
In this case, the methods reachable from D.func1() are precise -
Case 2: We call both b.process() and c.process() but from 2 methods -
However, in this case, C.handle() is also shown as a reachable method from D.func1()
As a result of this issue, I end up marking false positive methods too while backtracking from a method, say that is probably called from B.handle(). For eg: if b.handle() call a method foo(), and foo() is changed, we end up marking both D.func1() and D.func2() as affected, when in truth only D.func1() should be affected.
I understand that this is due to the fact that we find methods iteratively
Is there some way in which I can get reachable methods more precisely
Note:
This is the way I call reachable methods
And this is the spark config I've been using
Beta Was this translation helpful? Give feedback.
All reactions