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

VerifyError - Expecting to find integer on stack

    XMLWordPrintableJSON

Details

    Description

      The line
      result = prime * result + (int) (_tagReservationDate ^ (_tagReservationDate >>> 32))
      produces bytecode that fails to run in the accompanying test.

      <error message="(class: com/peersaver/model/Breaking, method: hashCode signature: ()I) Expecting to find integer on stack" type="java.lang.VerifyError">java.lang.VerifyError: (class: com/peersaver/model/Breaking, method: hashCode signature: ()I) Expecting to find integer on stack
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:169)
      at com.peersaver.model.BreakingTest.class$(BreakingTest.groovy)
      at com.peersaver.model.BreakingTest.$get$$class$com$peersaver$model$Breaking(BreakingTest.groovy)
      at com.peersaver.model.BreakingTest.testBreaking(BreakingTest.groovy:55)
      </error>

      The email conversation that covers drilling down into details can be found here:
      http://groovy.329449.n5.nabble.com/VerifyError-when-upgrading-from-Groovy-1-7-6-to-1-8-1-td4632721.html

      The relevant bit, quoting BlackDragon:
      "
      > L13
      > ILOAD 3: prime
      > [int] ILOAD 5: result
      > [int,int] IMUL
      > [int] ALOAD 0: this
      > [int, this] GETFIELD TrackingTagReservation._tagReservationDate : long
      > [int, long] ALOAD 0: this
      > [int, long, this] GETFIELD TrackingTagReservation._tagReservationDate : long
      > [int, long, long] LDC 32
      > [int, long, long, int] I2L
      > [int, long, long, long] LUSHR

      here is a problem, LUSHR expects [..., long, int], but we have 2 longs
      here. The I2L should not have happened. So I can confirm a problem here. "

      Thanks!
      Jason

      Attachments

        1. BreakingTest.groovy
          2 kB
          Jason Griffith

        Activity

          People

            blackdrag Jochen Theodorou
            jason@bobberinteractive.com Jason Griffith
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: