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

(1.1) core dump when invokevirtual refers to an interface.

    Details

    • Subcomponent:
    • CPU:
      x86, sparc
    • OS:
      solaris_2.4, windows_nt

      Description



      Name: akC45999 Date: 03/09/98



      Java Virtual Machine Specification reads (5.5.3c Method resolution):

      If C is an interface, method resolution throws an IncompatibleClassChangeError.

      JDK 1.1.6 dumps core instead.

      Note JVK 1.2 passes the test.

      ========================== invokevirtual01801.jasm
      // Ident: @(#)invokevirtual01801.jasm 1.1 98/03/10
      // Copyright 03/10/98 Sun Microsystems, Inc. All Rights Reserved
      //package javasoft/sqe/tests/vm/invokevirtual/invokevirtual018/invokevirtual01801;

      interface invokevirtual01801i {
        abstract public Method m:"()V";
      }


      public class invokevirtual01801 implements invokevirtual01801i {

      public Method m:"()V"
      stack 1 locals 1
      {
      return;
      }

      public static Method run:"([Ljava/lang/String;Ljava/io/PrintStream;)I"
      stack 2 locals 2
      {
      new invokevirtual01801;
      dup;
      invokespecial Method invokevirtual01801.<init>:"()V";

      // invokevirtual Method invokevirtual01801.m:"()V"; // right
      // following instruction must cause an error:
      invokevirtual Method invokevirtual01801i.m:"()V"; // wrong

      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 2 locals 1
      {
      aload_0;
      invokenonvirtual Method java/lang/Object.<init>:"()V";
      return;
      }

      } // end Class invokevirtual01801
      ================================================

      novo64% jasm invokevirtual01801.jasm
      novo64% setenv CLASSPATH .
      novo64% java invokevirtual01801
      SIGSEGV 11* segmentation violation
          si_signo [11]: SIGSEGV 11* segmentation violation
          si_errno [0]: Error 0
          si_code [1]: SEGV_MAPERR [addr: 0x38]

      stackbase=EFFFF5F0, stackpointer=EFFFF330

      Full thread dump:
          "Finalizer thread" (TID:0xee700208, sys_thread_t:0xee2c1db8, state:R) prio=1
          "Async Garbage Collector" (TID:0xee700250, sys_thread_t:0xee2f1db8, state:R) prio=1
      .....
       

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

        Attachments

          Activity

            People

            • Assignee:
              collins Gary Collins (Inactive)
              Reporter:
              rfqsunw Rfq Rfq (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: