Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-11359

ASTTransformation cause "General error during instruction selection"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.21
    • 3.x
    • Compiler
    • None
    • $ java -fullversion
      openjdk full version "17.0.10+7"
      $ uname -a
      Linux auoHome 6.6.26-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Apr 10 20:11:08 UTC 2024 x86_64 GNU/Linux

    Description

      When assembling the Grails project, I do obtain the following stacktrace:

       java.lang.ArrayIndexOutOfBoundsException: size==0
      at org.codehaus.groovy.classgen.asm.OperandStack.ensureStackNotEmpty(OperandStack.java:279)
      at org.codehaus.groovy.classgen.asm.OperandStack.replace(OperandStack.java:271)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitCastExpression(AsmClassGenerator.java:815)
      at org.codehaus.groovy.ast.expr.CastExpression.visit(CastExpression.java:90)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeReturn(StatementWriter.java:615)
      [. . .]

      Tell me if you need a more complete stacktrace. I try to work around this bug, changing the AST, without success. The error looks the same each time.

      To reproduce:
      $ tar xvfz testcase-asttransform-ko.tar.gz

      $ cd groovyInfra

      $ ./gradlew publishMavenPublicationToMavenLocal

      $ cd ..

      $ cd t620g

      $ ./gradlew assemble

      => BROKEN HERE

      Thanks for your help !

      Attachments

        1. expect.ex
          0.3 kB
          Adrien Guichard
        2. indent.groovy
          0.6 kB
          Adrien Guichard
        3. testcase-asttransform-ko.tar.gz
          1.33 MB
          Adrien Guichard

        Activity

          People

            Unassigned Unassigned
            AdrienGuichard Adrien Guichard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: