Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
change:
in file CHABuilder.Java
callSite.getMethodRef().resolve() may casue exceptions, use CallGraphs.resolveCallee(null, callSite) instead.
test case:
XCorpus -- aoi-2.8.1
error log before repair:
Exception in thread "main" pascal.taie.ir.proginfo.MethodResolutionFailedException: Cannot resolve <com.sun.opengl.util.BufferUtil: java.nio.FloatBuffer newFloatBuffer(int)>
at pascal.taie.ir.proginfo.MethodRef.resolve(MethodRef.java:184)
at pascal.taie.analysis.graph.callgraph.CHABuilder.resolveCalleesOf(CHABuilder.java:167)
at pascal.taie.analysis.graph.callgraph.CHABuilder.lambda$buildCallGraph$1(CHABuilder.java:129)
at java.base/java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:1003)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at pascal.taie.analysis.graph.callgraph.CHABuilder.buildCallGraph(CHABuilder.java:128)
at pascal.taie.analysis.graph.callgraph.CHABuilder.build(CHABuilder.java:102)
at pascal.taie.analysis.graph.callgraph.CallGraphBuilder.analyze(CallGraphBuilder.java:67)
at pascal.taie.analysis.graph.callgraph.CallGraphBuilder.analyze(CallGraphBuilder.java:37)
at pascal.taie.analysis.AnalysisManager.runProgramAnalysis(AnalysisManager.java:148)
at pascal.taie.analysis.AnalysisManager.runAnalysis(AnalysisManager.java:135)
at pascal.taie.analysis.AnalysisManager.lambda$execute$0(AnalysisManager.java:104)
at pascal.taie.util.Timer.runAndCount(Timer.java:93)
at pascal.taie.analysis.AnalysisManager.lambda$execute$1(AnalysisManager.java:103)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at pascal.taie.analysis.AnalysisManager.execute(AnalysisManager.java:102)
at pascal.taie.Main.executePlan(Main.java:154)
at pascal.taie.Main.lambda$main$0(Main.java:62)
at pascal.taie.util.Timer.lambda$runAndCount$0(Timer.java:112)
at pascal.taie.util.Timer.runAndCount(Timer.java:93)
at pascal.taie.util.Timer.runAndCount(Timer.java:111)
at pascal.taie.util.Timer.runAndCount(Timer.java:107)
at pascal.taie.Main.main(Main.java:52)
log after repair:
cg starts ...
Building call graph by CHA
Ignore methods of java.lang.Object
Call graph has 28841 reachable methods and 334714 edges
Dumping call graph to /home/byx/testSpace/javaprjs/aoi-2.8.1/cha-output/call-graph.dot
Dumping reachable methods to /home/byx/testSpace/javaprjs/aoi-2.8.1/cha-output/reachable-methods.txt
Dumping call edges to /home/byx/testSpace/javaprjs/aoi-2.8.1/cha-output/call-edges.txt
cg finishes, elapsed time: 15.79s
Tai-e finishes, elapsed time: 24.82s
options:
optionsFile: null
printHelp: false
classPath:
appClassPath:
mainClass: artofillusion.ArtOfIllusion
inputClasses: []
javaVersion: 5
prependJVM: false
allowPhantom: true
worldBuilderClass: pascal.taie.frontend.soot.SootWorldBuilder
outputDir: ../../testSpace/javaprjs/aoi-2.8.1/cha-output
preBuildIR: false
worldCacheMode: false
scope: APP
nativeModel: true
planFile: null
analyses:
cg: algorithm:cha;dump:true;dump-methods:true;dump-call-edges:true;
onlyGenPlan: false
keepResult: