Generating TAC fails with PrimitiveTACAIDomain for jasperreports-1.1.0

Issue #136 invalid
florian_kuebler
created an issue

The TACAI fails when converting all methods from jasperreports in an invokedynamik with the following exception.

error][progress] generating 3-address code failed
[error][progress] class org.opalj.ai.InterpretationFailedException$$anon$1: the interpretation failed
[error][progress]   org.opalj.ai.InterpretationFailedException$.apply(InterpretationFailedException.scala:81)
[error][progress]   org.opalj.ai.AI.throwInterpretationFailedException$1(AI.scala:578)
[error][progress]   org.opalj.ai.AI.continueInterpretation(AI.scala:2707)
[error][progress]   org.opalj.ai.AI.continueInterpretation(AI.scala:384)
[error][progress]   org.opalj.ai.AI.performInterpretation(AI.scala:357)
[error][progress]   org.opalj.ai.AI.perform(AI.scala:331)
[error][progress]   org.opalj.ai.AI.apply(AI.scala:196)
[error][progress]   org.opalj.ai.common.SimpleAIKey$.$anonfun$compute$3(SimpleAIKey.scala:99)
[error][progress]   org.opalj.tac.DefaultTACAIKey$.computeAndCacheTAC$1(DefaultTACAIKey.scala:76)
[error][progress]   org.opalj.tac.DefaultTACAIKey$.$anonfun$compute$1(DefaultTACAIKey.scala:94)
[error][progress]   org.opalj.fpcf.analyses.SimpleEscapeAnalysisDemo$.$anonfun$doAnalyze$6(SimpleEscapeAnalysisDemo.scala:105)
[error][progress]   org.opalj.concurrent.package$.$anonfun$parForeachArrayElement$2(package.scala:240)
[error][progress]   scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error][progress]   scala.concurrent.Future$.$anonfun$apply$1(Future.scala:655)
[error][progress]   scala.util.Success.$anonfun$map$1(Try.scala:251)
[error][progress]   scala.util.Success.map(Try.scala:209)
[error][progress]   scala.concurrent.Future.$anonfun$map$1(Future.scala:289)
[error][progress]   scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
[error][progress]   scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
[error][progress]   scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
[error][progress]   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error][progress]   java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error][progress]   java.lang.Thread.run(Thread.java:745)
[error][progress] class scala.MatchError: Naught (of class org.opalj.collection.immutable.Naught$)
[error][progress]   org.opalj.ai.AI.continueInterpretation(AI.scala:2095)
[error][progress]   org.opalj.ai.AI.continueInterpretation(AI.scala:384)
[error][progress]   org.opalj.ai.AI.performInterpretation(AI.scala:357)
[error][progress]   org.opalj.ai.AI.perform(AI.scala:331)
[error][progress]   org.opalj.ai.AI.apply(AI.scala:196)
[error][progress]   org.opalj.ai.common.SimpleAIKey$.$anonfun$compute$3(SimpleAIKey.scala:99)
[error][progress]   org.opalj.tac.DefaultTACAIKey$.computeAndCacheTAC$1(DefaultTACAIKey.scala:76)
[error][progress]   org.opalj.tac.DefaultTACAIKey$.$anonfun$compute$1(DefaultTACAIKey.scala:94)
[error][progress]   org.opalj.fpcf.analyses.SimpleEscapeAnalysisDemo$.$anonfun$doAnalyze$6(SimpleEscapeAnalysisDemo.scala:105)
[error][progress]   org.opalj.concurrent.package$.$anonfun$parForeachArrayElement$2(package.scala:240)
[error][progress]   scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error][progress]   scala.concurrent.Future$.$anonfun$apply$1(Future.scala:655)
[error][progress]   scala.util.Success.$anonfun$map$1(Try.scala:251)
[error][progress]   scala.util.Success.map(Try.scala:209)
[error][progress]   scala.concurrent.Future.$anonfun$map$1(Future.scala:289)
[error][progress]   scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
[error][progress]   scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
[error][progress]   scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
[error][progress]   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error][progress]   java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error][progress]   java.lang.Thread.run(Thread.java:745)

Comments (3)

  1. Michael Eichberg repo owner

    Where did you find that code (i.e., the bin.zip)?

    The code (input to OPAL: protected void exportReportToStream(java.io.OutputStream) throws net.sf.jasperreports.engine.JRException;) is totally broken (hence, I will close this issue):

            0: aload_0
             1: aload_0
             2: getfield      #75                 // Field net/sf/jasperreports/engine/export/JRPdfExporter.jasperPrint:Lnet/sf/jasperreports/engine/JasperPrint;
             5: invokevirtual #76                 // Method net/sf/jasperreports/engine/JasperPrint.getPageWidth:()I
             8: i2f
             9: aload_0
            10: getfield      #75                 // Field net/sf/jasperreports/engine/export/JRPdfExporter.jasperPrint:Lnet/sf/jasperreports/engine/JasperPrint;
            13: invokevirtual #77                 // Method net/sf/jasperreports/engine/JasperPrint.getPageHeight:()I
            16: i2f
            17: invokedynamic #1224,  0           // InvokeDynamic #1:C$D:(FF)Lcom/lowagie/text/Rectangle;
            22: invokespecial #79                 // Method com/lowagie/text/Document."<init>":(Lcom/lowagie/text/Rectangle;)V
    // HERE, THE STACK IS EMPTY - THE SUBSEQUENT PUTFIELD HAS TO FAIL!
            25: putfield      #2                  // Field net/sf/jasperreports/engine/export/JRPdfExporter.document:Lcom/lowagie/text/Document;
    
  2. Log in to comment