Open karlls12321 opened 5 months ago
Hi @karlls12321 so since we have static methods here this would have a different explanation than my other comment. Is the only entrypoint B.foo()
for this case? If so, I'm not sure why the A$bar.<clinit>()V --> B.foo()Z
shows up in the 0-CFA call graph and would have to take a look.
Hi, I used Wala to generate call graphs for my projects. However, I found two strange bugs. Similar to #1386, CHA and context insensitive report inconsistent behaviour. See the minimized code example below:
Input file
A.java
B.java
In this example, I set
B.foo()Z
as the entry point in CHA and CI. CI reports the edgeA$bar.<clinit>()V --> B.foo()Z
, and CHA does not have this edge.I think the problem may be related to whether the method is reachable in default. The problem is similar to the issue #1386 .
However, I think setting the
<clinit>
method as default entry is reasonable. In #1386,<init>
method should not be default entry.Wala setup
Wala version: 1.6.2