WALA: Implicit parameter error involving Collector

I am receiving an error when building a call graph of the following program:

package p;

import java.util.HashSet;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

class A {
	void m() {
		Set<Object> set = new HashSet<>();
		Stream<Object> stream = set.parallelStream();
		stream.sorted(); 
		stream.collect(Collectors.toList()); // this call forces the error.
	}
}

I am at bb0f38338e00a9ffb37b711a08db10ea8a4dc332 and using JDK version 1.8.0_121.

Error details:

------------------ ERROR:
LocalPointerKey: [Node: synthetic < Primordial, Lwala/lambda$java$util$stream$Nodes$CollectorTask$OfRef$1, apply(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; > Context: CallStringContext: [ java.util.stream.Nodes$CollectorTask.onCompletion(Ljava/util/concurrent/CountedCompleter;)V@32 java.util.concurrent.CountedCompleter.tryComplete()V@15 ], v2]
Constant? false
   -- IR:
synthetic < Primordial, Lwala/lambda$java$util$stream$Nodes$CollectorTask$OfRef$1, apply(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; >
CFG:
BB0[0..0]
    -> BB1
    -> BB3
BB1[1..1]
    -> BB2
    -> BB3
BB2[2..2]
    -> BB3
BB3[-1..-2]
Instructions:
BB0
0   v2 = new <Application,Ljava/util/stream/Nodes$ConcNode>@1
BB1
1   invokespecial < Application, Ljava/util/stream/Nodes$ConcNode, <init>(Ljava/util/stream/Node;Ljava/util/stream/Node;)V > v2,v3,v4 @2 exception:v3
BB2
2   return v2                                
BB3


!ENTRY org.eclipse.core.jobs 4 2 2017-03-13 17:04:29.135
!MESSAGE An internal error occurred during: "...".
!STACK 0
com.ibm.wala.util.debug.UnimplementedError: How can parameter be implicit?
	at com.ibm.wala.util.debug.Assertions.UNREACHABLE(Assertions.java:55)
	at com.ibm.wala.ipa.callgraph.propagation.PropagationSystem.recordImplicitPointsToSet(PropagationSystem.java:246)
	at com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder$ConstraintVisitor.visitNew(SSAPropagationCallGraphBuilder.java:1222)
	at com.ibm.wala.ssa.SSANewInstruction.visit(SSANewInstruction.java:101)
	at com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder.addBlockInstructionConstraints(SSAPropagationCallGraphBuilder.java:292)
	at com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder.addNodeInstructionConstraints(SSAPropagationCallGraphBuilder.java:263)
	at com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder.unconditionallyAddConstraintsFromNode(SSAPropagationCallGraphBuilder.java:235)
	at com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder.addConstraintsFromNode(SSAPropagationCallGraphBuilder.java:201)
	at com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder.addConstraintsFromNewNodes(PropagationCallGraphBuilder.java:338)
	at com.ibm.wala.ipa.callgraph.propagation.StandardSolver.solve(StandardSolver.java:58)
	at com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder.makeCallGraph(PropagationCallGraphBuilder.java:271)
	at com.ibm.wala.client.AbstractAnalysisEngine.buildCallGraph(AbstractAnalysisEngine.java:142)
...

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 27 (27 by maintainers)

Most upvoted comments

it does, yes. in LambdaTest, there is testBug144.

On Mar 15, 2017, at 1:03 PM, Raffi Khatchadourian notifications@github.com wrote:

@juliandolby https://github.com/juliandolby #144 (comment) https://github.com/wala/WALA/issues/144#issuecomment-286590137 should include your test, correct?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wala/WALA/issues/144#issuecomment-286810036, or mute the thread https://github.com/notifications/unsubscribe-auth/ABk3foZ3KQ_00Q6ptEDlPtvJpDbzneC4ks5rmBnhgaJpZM4Mb45K.