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

JVM accepts class with invalid stackmaps incoming type

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: viR10068 Date: 11/17/2003


      The JVM (1.5.0-beta-b28) accepts class files when incoming type
      state is assignable to the one in the StackMap but instruction
      that follows StackMap uses 'bogus'.
      Note, that if the 'null' instead of 'bogus' is used than the JVM
      rejects class file with VerifyError.

      The new JCK test is failed due to this error:
      vm/cldc/typechecker/rules/rules010/rules01001m3/rules01001m3.html

      The test source:
      --------------------- test19.jasm ---------------------------
      public class test19 version 49:0 {
      public Method "<init>":"()V"
      stack 1 locals 1
      {
      aload_0;
      invokespecial Method java/lang/Object."<init>":"()V";
      return;
      }

      public static Method tt:"()I"
      stack 2 locals 2
      {
      iconst_0;
      iconst_1;
      istore_1;
      istore_0;
      // wrong type state (derived is assignable but the following instruction uses "bogus")
      locals_map bogus, int;
      iload_0;

      iload_1;
      iadd;
      ireturn;
      }

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

      Exception in thread "main" java.lang.NoSuchMethodError: main
      %

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

        Attachments

          Activity

            People

            • Assignee:
              myangsunw Mingyao Yang (Inactive)
              Reporter:
              vivsunw Viv Viv (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: