Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8170594

>>>=0 generates invalid bytecode for BaseNode LHS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 9
    • 8u112, 9
    • core-libs
    • None
    • b148
    • generic
    • generic

    Backports

      Description

        The expression "a.b >>>=0" or "a[b] >>>=0" will leave a lingering "a" loaded on the operand stack when generating bytecode, in many cases throwing off stack maps and ultimately failing the verifier.

        This is specific to the >>>= operator, in case where the LHS is a base expression (property or element access) and the RHS is a literal zero.

        The bug is in a special-case handling of RHS zero (we have a special path for "coerce to UInt32, which is basically what >>>=0 is doing) that is not loading LHS with "base already on stack" flag set and thus resulting in an additional, unnecessary load of the base.

        Attachments

          Issue Links

            Activity

              People

                attila Attila Szegedi
                attila Attila Szegedi
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: