Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update soot to latest version #589

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update soot to latest version #589

wants to merge 2 commits into from

Conversation

serenaponta
Copy link
Contributor

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

@henrikplate
Copy link
Contributor

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
Copy link
Contributor

@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)?

@mayaba
Copy link
Contributor

mayaba commented Aug 28, 2023

@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

@henrikplate
Copy link
Contributor

@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?

@mayaba
Copy link
Contributor

mayaba commented Aug 28, 2023

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

@mayaba
Copy link
Contributor

mayaba commented Aug 28, 2023

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
Copy link
Contributor

mayaba commented Aug 28, 2023

@henrikplate I wasn't able to push to this PR. So, I created a different one #595
I will test the change with an open source project that is written in Java 17 later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants