soot
soot copied to clipboard
java.lang.RuntimeException when try to generate a jimple file
Steps to reproduce: 1.) write a Test.java
public class Test {
public String foo(String s1, String s2){
return s1 + " " + s2;
}
public static void main(String[] args) {
Test t = new Test();
System.out.println(t.foo("Hello","World"));
}
}
and compile it, then run java -cp sootclasses-trunk-jar-with-dependencies.jar soot.Main -cp . -pp Test -f jimple -d ./sootOutput
Java version:
java --version java 11.0.16 2022-07-19 LTS
Soot version:
trunk
Command line:
-cp . -pp Test -f jimple -d ./sootOutput
Max Memory:
3984MB
Stack trace:
java.lang.RuntimeException: Failed to convert <Test: java.lang.String foo(java.lang.String,java.lang.String)> at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2163) at soot.SootMethod.retrieveActiveBody(SootMethod.java:402) at soot.PackManager$1.run(PackManager.java:1279) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.RuntimeException: java.lang.invoke.StringConcatFactory was not found on classpath. at soot.asm.AsmMethodSource.getClassFromScene(AsmMethodSource.java:374) at soot.asm.AsmMethodSource.toSootMethodRef(AsmMethodSource.java:1571) at soot.asm.AsmMethodSource.convertInvokeDynamicInsn(AsmMethodSource.java:1459) at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1909) at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2161) ... 5 more