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

JVM rejects valid class file with exceptions

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Name: viR10068 Date: 10/31/2003


      The JVM (1.5.0-beta-b26) rejects valid class file with
      exception. Note, the prolog spec accepts this class.

      The new JCK tests are failed due to this error:
      vm/instr/aaload/aaload003/aaload00301m1t/aaload00301m1t.html

      The test source:
      --------------------- test03.jasm ---------------------------
      public class test03 version 49:0 {

      public static Method run:"([Ljava/lang/String;Ljava/io/PrintStream;)I"
      stack 2 locals 4
      {
      aconst_null;
      astore_2;
      try t8;
      aload_2;
      iconst_0;
      aaload;
      astore_3;
      iconst_2;
      ireturn;
      endtry t8;
      catch t8 java/lang/NullPointerException;
      locals_map class "[Ljava/lang/String;", class java/io/PrintStream, null;
      stack_map class java/lang/NullPointerException;

      pop;
      iconst_0;
      ireturn;
      }

      public static Method main:"([Ljava/lang/String;)V"
      stack 2 locals 1
      {
      aload_0;
      getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
      invokestatic Method run:"([Ljava/lang/String;Ljava/io/PrintStream;)I";
      bipush 95/*STATUS_TEMP*/;
      iadd;
      invokestatic Method java/lang/System.exit:"(I)V";
      return;
      }

      public Method <init>:"()V"
      stack 1 locals 1
      {
      aload_0;
      invokenonvirtual Method java/lang/Object.<init>:"()V";
      return;
      }

      } // end Class aaload00301m1t
      ----------------------------------------------------------
      The execution log:
      % jasm test03.jasm && jdk1.5.0-b26/solaris-sparc/bin/java -showversion -Xfuture test03
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b26)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b26, mixed mode)

      Exception in thread "main" java.lang.VerifyError: Bad type on operand stack in method
      test03.run([Ljava/lang/String;Ljava/io/PrintStream;)I at offset 4
      %


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

        Attachments

          Activity

            People

            • Assignee:
              wtaosunw Wei Tao (Inactive)
              Reporter:
              vivsunw Viv Viv (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: