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]: java.lang.IllegalStateException: Failed to apply sootup.java.core.interceptors.TypeAssigner@1be094dd ... #958

Open
dbueno opened this issue Jun 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dbueno
Copy link

dbueno commented Jun 19, 2024

What happened?

What happened? An exception was thrown when attempting to retrieve the body of a JavaSootMethod.

The relevant line of the log output is: at sootup.core.model.SootMethod.getBody (SootMethod.java:177)

  1. Check out: https://github.com/dbueno/sootup-csv-exporter
  2. Test case here: https://github.com/TaintBench/backflash/releases/tag/APK. Copy it to test.apk in Run mvn compile exec:java

Version

1.3.0

Relevant log output

java.lang.IllegalStateException: Failed to apply sootup.java.core.interceptors.TypeAssigner@50ce3c1e to <com.adobe.flashplayer_.adobeCore: void onReceive(android.content.Context,android.content.Intent)>
    at sootup.java.bytecode.frontend.AsmMethodSource.resolveBody (AsmMethodSource.java:240)
    at sootup.core.model.SootMethod.lazyBodyInitializer (SootMethod.java:98)
    at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get (Suppliers.java:181)
    at sootup.core.model.SootMethod.getBody (SootMethod.java:177)
    at sootupexport.FactGenerator.generate (FactGenerator.java:51)
    at sootupexport.FactGenerator.generate (FactGenerator.java:31)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1625)
    at java.util.stream.ReferencePipeline$Head.forEach (ReferencePipeline.java:762)
    at sootupexport.FactGenerator.run (FactGenerator.java:23)
    at sootupexport.Main.main (Main.java:30)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:279)
    at java.lang.Thread.run (Thread.java:840)
Caused by: java.lang.ClassCastException: class sootup.core.jimple.common.constant.StringConstant cannot be cast to class sootup.core.jimple.basic.Local (sootup.core.jimple.common.constant.StringConstant and sootup.core.jimple.basic.Local are in unnamed module of loader org.codehaus.mojo.exec.URLClassLoaderBuilder$ExecJavaClassLoader @3e1fd62b)
    at sootup.java.core.interceptors.typeresolving.TypePromotionVisitor.visit (TypePromotionVisitor.java:76)
    at sootup.java.core.interceptors.typeresolving.TypeChecker.handleInvokeExpr (TypeChecker.java:300)
    at sootup.java.core.interceptors.typeresolving.TypeChecker.caseAssignStmt (TypeChecker.java:220)
    at sootup.core.jimple.common.stmt.JAssignStmt.accept (JAssignStmt.java:201)
    at sootup.core.jimple.common.stmt.JAssignStmt.accept (JAssignStmt.java:59)
    at sootup.java.core.interceptors.typeresolving.TypePromotionVisitor.getPromotedTyping (TypePromotionVisitor.java:47)
    at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:197)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1625)
    at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:509)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:499)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:921)
    at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:682)
    at sootup.java.core.interceptors.typeresolving.TypeResolver.resolve (TypeResolver.java:81)
    at sootup.java.core.interceptors.TypeAssigner.interceptBody (TypeAssigner.java:42)
    at sootup.java.bytecode.frontend.AsmMethodSource.resolveBody (AsmMethodSource.java:234)
    at sootup.core.model.SootMethod.lazyBodyInitializer (SootMethod.java:98)
    at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get (Suppliers.java:181)
    at sootup.core.model.SootMethod.getBody (SootMethod.java:177)
    at sootupexport.FactGenerator.generate (FactGenerator.java:51)
    at sootupexport.FactGenerator.generate (FactGenerator.java:31)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1625)
    at java.util.stream.ReferencePipeline$Head.forEach (ReferencePipeline.java:762)
    at sootupexport.FactGenerator.run (FactGenerator.java:23)
    at sootupexport.Main.main (Main.java:30)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:279)
    at java.lang.Thread.run (Thread.java:840)
@dbueno dbueno added the bug Something isn't working label Jun 19, 2024
@swissiety swissiety self-assigned this Jun 21, 2024
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

3 participants