Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34751

StackOverflowError in Groovy scripts

XMLWordPrintable

      Due to a regression in Groovy 2.4 (GROOVY-7826) scripts using some of the core classes with complex generic type arguments (e.g. hudson.model.Run or hudson.model.Job) will cause a StackoverflowError.

      Run this script in Script Console to reproduce the problem:

      def foo(hudson.model.Run run) {}
      

      This affects Script Console, Pipeline, Job DSL, Groovy plugin (system Groovy script) and probably other plugins using the Groovy runtime provided by Jenkins core.

      java.lang.StackOverflowError
      	at java.lang.StringBuilder.append(StringBuilder.java:132)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1173)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1159)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1178)
      	at org.codehaus.groovy.ast.ClassNode.genericTypeAsString(ClassNode.java:1199)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1173)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1159)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1178)
      	at org.codehaus.groovy.ast.ClassNode.genericTypeAsString(ClassNode.java:1199)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1173)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1159)
      	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1178)
      	at org.codehaus.groovy.ast.ClassNode.genericTypeAsString(ClassNode.java:1199)
              ...
      

            daspilker Daniel Spilker
            daspilker Daniel Spilker
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: