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

Verifier permits non-sorted match-offset pairs for lookupswitch instruction.

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.4
    • Not verified



      Name: akC45999 Date: 11/11/96


      The section "6.4 The Virtual machine instruction set" of The Java Virtual Machine, subsection lookupswitch claims:

      "The table match-offset pairs of the lookupswitch instruction must be sorted in increasing numerical order by match.".

      Meanwhile, following test passes the verification and return 0 during execution:
      -----------------------------------------------------------------
      public class lookupswitch00401 {

      public static Method run:"([Ljava/lang/String;Ljava/io/PrintStream;)I"
      stack 3 locals 1
      {
      iconst_3;
      lookupswitch {
      4: Ld;
      2: Ln;
      8: Ld;
      3: Ln;
      default: Ld };
      Ld: iconst_2;
      ireturn;
      Ln: iconst_0;
      ireturn;
      }

      }
      -----------------------------------------------------------------

      ======================================================================

            fyellinsunw Frank Yellin (Inactive)
            rfqsunw Rfq Rfq (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: