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

[Bug]: IllegalArgumentException when applying Reaching defs in DAE #1096

Open
sahilagichani14 opened this issue Oct 4, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@sahilagichani14
Copy link
Collaborator

What happened?

when applying Dead Assignment Eliminator, we get an "Invalid StmtGraph. A Trap is not created as a traps endStmt was not visited during the iteration of all Stmts."

Version

Latest develop branch

Relevant log output

Exception in thread "main" java.lang.IllegalStateException: Failed to apply sootup.core.transform.RunTimeBodyInterceptor@7d454463 to <org.testng.reporters.TestHTMLReporter: void generateLog(org.testng.ITestContext,java.lang.String,java.lang.String,java.util.Collection,java.util.Collection,java.util.Collection,java.util.Collection,java.util.Collection,java.util.Collection)>
        at sootup.java.bytecode.frontend.conversion.AsmMethodSource.resolveBody(AsmMethodSource.java:241)
        at sootup.core.model.SootMethod.lazyBodyInitializer(SootMethod.java:98)
        at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:200)
        at sootup.core.model.SootMethod.getBody(SootMethod.java:177)
        at upb.thesis.SetUp.lambda$setupSootUp$0(SetUp.java:191)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at upb.thesis.SetUp.lambda$setupSootUp$1(SetUp.java:189)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at upb.thesis.SetUp.setupSootUp(SetUp.java:188)
        at upb.thesis.SetUp.executeStaticAnalysis(SetUp.java:49)
        at upb.thesis.Main.main(Main.java:81)
Caused by: java.lang.IllegalArgumentException: Invalid StmtGraph. A Trap is not created as a traps endStmt was not visited during the iteration of all Stmts.
        at sootup.core.graph.StmtGraph$BlockGraphIteratorAndTrapAggregator.getTraps(StmtGraph.java:490)
        at sootup.core.graph.MutableBlockStmtGraph.buildTraps(MutableBlockStmtGraph.java:1655)
        at sootup.core.graph.StmtGraph.getEntrypoints(StmtGraph.java:180)
        at sootup.analysis.intraprocedural.FlowAnalysis$AnalysisDirection$2.getEntries(FlowAnalysis.java:305)
        at sootup.analysis.intraprocedural.FlowAnalysis$Orderer.newUniverse(FlowAnalysis.java:108)
        at sootup.analysis.intraprocedural.FlowAnalysis.execute(FlowAnalysis.java:453)
        at sootup.analysis.intraprocedural.ForwardFlowAnalysis.execute(ForwardFlowAnalysis.java:20)
        at sootup.analysis.intraprocedural.reachingdefs.ReachingDefs$ReachingDefsAnalysis.<init>(ReachingDefs.java:73)
        at sootup.analysis.intraprocedural.reachingdefs.ReachingDefs.<init>(ReachingDefs.java:41)
        at sootup.interceptors.DeadAssignmentEliminator.interceptBody(DeadAssignmentEliminator.java:68)
        at sootup.core.transform.RunTimeBodyInterceptor.interceptBody(RunTimeBodyInterceptor.java:54)
        at sootup.java.bytecode.frontend.conversion.AsmMethodSource.resolveBody(AsmMethodSource.java:235)
        ... 18 more
@sahilagichani14 sahilagichani14 added the bug Something isn't working label Oct 4, 2024
@sahilagichani14 sahilagichani14 self-assigned this Oct 4, 2024
@stschott
Copy link
Collaborator

This should be fixed now. Please check.

@sahilagichani14
Copy link
Collaborator Author

#1119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants