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

groovyc hangs when compiling nested enum

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.5
    • 3.0.0-beta-3
    • Compiler
    • None
    • Linux ubuntu-xenial 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

    Description

      This problem was discovered in a Jenkins pipeline, but then nailed down and found it failed with groovyc compiler too.

      Creating a script with two nested enums, like:

      class TestClass {
          enum OuterEnum {
              VALUE,
              enum InnerEnum {
                  A
              }
          }
      }
      

      And compiling with groovyc script.groovy makes the compiler freeze with 100% CPU usage.

      In Jenkins, this results in the Job and executor being freezed and zombie (need to kill the job and executor thread), but I am reporting this to Jenkins as an independent issue.

      As the problem seems to happen in a stripped down groovy script, I am reporting it here too.

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              airadier Álvaro Iradier
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h