groovy
  1. groovy
  2. GROOVY-4951

VerifyError - Expecting to find integer on stack

    Details

    • Testcase included:
      yes
    • Number of attachments :
      1

      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

        Activity

        Hide
        Jason Griffith added a comment -

        A copy that doesn't reference "TrackingTagReservation", the original name of "Breaking"

        Show
        Jason Griffith added a comment - A copy that doesn't reference "TrackingTagReservation", the original name of "Breaking"
        Hide
        John Bito added a comment -

        It's good to see there's attention to this. Jason and I will be away for a week and will be available starting 26 Aug to test out any updates. We're excited to get to Groovy 1.8, so please let us know if you have any requests or suggestions.

        Show
        John Bito added a comment - It's good to see there's attention to this. Jason and I will be away for a week and will be available starting 26 Aug to test out any updates. We're excited to get to Groovy 1.8, so please let us know if you have any requests or suggestions.
        Hide
        blackdrag blackdrag added a comment -

        fixed

        Show
        blackdrag blackdrag added a comment - fixed
        Hide
        Jason Griffith added a comment -

        Hi Jochen

        I downloaded today's 1.8.2 snapshot, and this test still fails for me. Is the fix in 1.8.2's snapshot?

        Thanks!
        Jason

        Show
        Jason Griffith added a comment - Hi Jochen I downloaded today's 1.8.2 snapshot, and this test still fails for me. Is the fix in 1.8.2's snapshot? Thanks! Jason
        Hide
        blackdrag blackdrag added a comment -

        if the snapshot is from september, it should be in there, yes

        Show
        blackdrag blackdrag added a comment - if the snapshot is from september, it should be in there, yes
        Hide
        blackdrag blackdrag added a comment -

        ok, I found my mistake, I made the test with >> instead of >>> and forgot about the unassigned shift altogether... will be corrected in a sec

        Show
        blackdrag blackdrag added a comment - ok, I found my mistake, I made the test with >> instead of >>> and forgot about the unassigned shift altogether... will be corrected in a sec

          People

          • Assignee:
            blackdrag blackdrag
            Reporter:
            Jason Griffith
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: