wala / WALA

T.J. Watson Libraries for Analysis, with frontends for Java, Android, and JavaScript, and may common static program analyses
http://github.com/wala/WALA
Eclipse Public License 2.0
758 stars 221 forks source link

Call graph construction for constructor reference seems to be broken #445

Closed msridhar closed 5 years ago

msridhar commented 5 years ago

Test case:

https://github.com/wala/WALA/blob/4d4a1fda93f538aac04c575781f29a1de6f625a9/com.ibm.wala.core.testdata/src/lambda/MethodRefs.java

The key code is here:

https://github.com/wala/WALA/blob/4d4a1fda93f538aac04c575781f29a1de6f625a9/com.ibm.wala.core.testdata/src/lambda/MethodRefs.java#L74-L75

This should make C4.target() reachable, but when I construct a call graph for the example, it is not reachable.

I've pushed a branch ms/test-method-refs with the test case. On that branch you can run ./gradlew :com.ibm.wala.core.tests:test --tests *LambdaTest.testMethodRefs* to see the failing test.

@juliandolby can you take a look?

juliandolby commented 5 years ago

Definitely looks like a bug, and the pull request looks good to me.