steady icon indicating copy to clipboard operation
steady copied to clipboard

Update soot to latest version

Open serenaponta opened this issue 1 year ago • 7 comments

Updated soot version to 4.4.1 as the previously used (4.1.0) didn't support JDK 17.

serenaponta avatar Jul 10 '23 17:07 serenaponta

Compilation error:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project lang-java-reach-soot: Compilation failure
/home/jenkins/agent/workspace/Steady_Pipeline_PR-589/lang-java-reach-soot/src/main/java/org/eclipse/steady/cg/soot/CustomEntryPointCreator.java:[24,25] cannot find symbol
  symbol:   class LocalGenerator
  location: package soot.javaToJimple

henrikplate avatar Aug 26 '23 14:08 henrikplate

@mayaba - Serena updated Soot following #588. Do you mind checking whether your app can also be analyzed with Java 17 + Soot (even though Wala already works with Java 17)?

henrikplate avatar Aug 27 '23 14:08 henrikplate

@henrikplate I just started the a2c test with the same Java 17 project I tested with WALA. The old exception is gone. But faced a different one

2023-08-28 14:59:34,796 [vulas-reach-1] [INFO ] .soot.SootCallgraphConstructor - [7033] entry points set
2023-08-28 14:59:34,796 [vulas-reach-1] [INFO ] .soot.SootCallgraphConstructor - Starting call graph construction for [PROJECT-NAME:VERSION]
Exception in thread "vulas-reach-1" java.lang.RuntimeException: Failed to convert <org.objectweb.asm.AnnotationVisitor: void visit(java.lang.String,java.lang.Object)>
	at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
	at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
	at soot.jimple.toolkits.annotation.LineNumberAdder.internalTransform(LineNumberAdder.java:63)
	at soot.PackManager.runPacksNormally(PackManager.java:496)
	at soot.PackManager.runPacks(PackManager.java:425)
	at org.eclipse.steady.cg.soot.SootCallgraphConstructor.buildCallgraph(SootCallgraphConstructor.java:418)
	at org.eclipse.steady.cg.ReachabilityAnalyzer.run(ReachabilityAnalyzer.java:399)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: Trying to create virtual invoke expression for interface type (org.objectweb.asm.AnnotationVisitor in file unknown). Use JInterfaceInvokeExpr instead!
	at soot.jimple.internal.JVirtualInvokeExpr.<init>(JVirtualInvokeExpr.java:51)
	at soot.jimple.Jimple.newVirtualInvokeExpr(Jimple.java:469)
	at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1433)
	at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
	at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
	... 7 more

mayaba avatar Aug 28 '23 19:08 mayaba

@mayaba - Thank you for checking! Looking at the stack trace, this may be a problem in re-bundled ASM code. Is the application you use for testing open source or proprietary?

henrikplate avatar Aug 28 '23 19:08 henrikplate

@henrikplate I'm testing a proprietary project. I can try with an open source one. Give me a min.

mayaba avatar Aug 28 '23 19:08 mayaba

Hi @henrikplate, I wrote a unit test to test Soot with a Java 17 compiled JAR and worked perfectly. I used the same JAR I used with WALA unit test.

mayaba avatar Aug 28 '23 20:08 mayaba

@henrikplate I wasn't able to push to this PR. So, I created a different one https://github.com/eclipse/steady/pull/595 I will test the change with an open source project that is written in Java 17 later.

mayaba avatar Aug 28 '23 20:08 mayaba