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

1.0, 2.0: Segmentation violation on HS JVM 1.0fcs

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      1.1
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: szC45993 Date: 06/10/99



      The Tonga/src/nsk/coverage/parse3001 test (source is placed below) crushes
      java version "1.2.1" HotSpot VM (1.0fcs, mixed mode, build E) on Win32
      under the internal compilation of method which
      uses multianewarray ( multianewarray class [I, 1 ) instruction.

      It seems that the crash is arisen in the following dynamic chain of HS
      procedures invocation:

      Parse::do_multianewarray(int 4, int 1, int 40) line 780 + 18 bytes
      Parse::do_one_bytecode(Bytecodes::Code _multianewarray, MethodByteCodeStream & {...}, unsigned int 0) line 2073
      Parse::do_one_block(MethodByteCodeStream & {...}, unsigned int 28, unsigned int 0) line 585 + 20 bytes
      Parse::Init(CompilationScope * 0x00cde42c, JVMStateObj * 0x00000000, JVMStateObj * 0x00000000, int 0, int 1) line 457
      Parse::Parse(CompilationScope * 0x00cde42c, PhaseGVN & {...}) line 215
      Compile::Compile(CompilationScope * 0x00cde42c) line 118
      MethodCompiler::compile_helper(methodOopDesc * 0x0c3ac3a8) line 97
      VM_MethodCompiler::doit() line 241 + 12 bytes
      VM_Operation::evaluate() line 31
      VMThread::evaluate_operation(VM_Operation * 0x0081fda0) line 439
      VMThread::loop() line 563
      VMThread::vm_thread_main(Monitor * 0x007d1430) line 336
      _start(void * 0x00812da0) line 197 + 19 bytes
      MSVCRT! 78009b75()
      KERNEL32! 77f04f2c()


      See LOG:
      ========

      [#] cd F:/nsk/coverage/parse3/parse3001
      [#] CLASSPATH="f:/ld21/java/sqe/sqe-tools2.0-nsk/asmtools.jar;.;${CLASSPATH}"
      [#] export CLASSPATH
      [#] c:/jdk1.2.1A/bin/java javasoft.sqe.jasm.Main -d . parse3001.jasm
      [#] c:/jdk1.2.1A/bin/java -version
      java version "1.2.1"
      HotSpot VM (1.0fcs, mixed mode, build E)
      [#] c:/jdk1.2.1A/bin/java -verify parse3001
      [1] + Done(139) c:/jdk1.2.1A/bin/java -verify parse3001
        150 Segmentation violation c:/jdk1.2.1A/bin/java
      [#] c:/jdk1.2.1A/bin/java -classic -version
      java version "1.2.1"
      Classic VM (build JDK-1.2.1-A, native threads)
      [#] c:/jdk1.2.1A/bin/java -classic -verify parse3001
      [#]



      SOURCE:
      ========

      //--------------------- parse3001.jasm:
      // Ident: %Z%%M% %I% %E%
      // Copyright %G% Sun Microsystems, Inc. All Rights Reserved

      public class parse3001
      {

      static final Field mask:I = int 8191;
      static final Field delta:I = int 123;
      static final Field Len:I = int 7944;
      static Field rand:"Ljava/util/Random;";

      static Method nextInt:"()I"
      stack 2 locals 1
      {
      getstatic Field rand:"Ljava/util/Random;";
      invokevirtual Method java/util/Random.nextInt:"()I";
      sipush 8191;
      iand;
      bipush 123;
      isub;
      istore_0;
      iload_0;
      ireturn;
      }

      static Method randomWrite:"([F)I"
      stack 4 locals 4
      {
      aload_0;
      arraylength;
      istore_1;
      iconst_0;
      istore_3;
      goto L43;
      L8: invokestatic Method nextInt:"()I";
      istore_2;
      try t28;
      aload_0;
      iload_2;
      iload_2;
      i2l;
      l2f;
      fastore;
      iload_2;
      iflt L26;
      iload_2;
      iload_1;
      if_icmplt L40;
      L26: iconst_1;
      ireturn;
      endtry t28;
      catch t28 java/lang/ArrayIndexOutOfBoundsException;
      pop;
      iload_2;
      iflt L40;
      iload_2;
      iload_1;
      if_icmpge L40;
      iconst_2;
      ireturn;
      L40: iinc 3, 1;
      L43: iload_3;
      iload_1;
      if_icmplt L8;
      iconst_0;
      ireturn;
      }

      static Method randomRead:"([F)I"
      stack 8 locals 5
      {
      aload_0;
      arraylength;
      istore_1;
      iconst_0;
      istore_3;
      goto L60;
      L8: invokestatic Method nextInt:"()I";
      istore_2;
      try t45;
      aload_0;
      iload_2;
      faload;
      fstore 4;
      iload_2;
      iflt L26;
      iload_2;
      iload_1;
      if_icmplt L28;
      L26: iconst_1;
      ireturn;
      L28: fload 4;
      fconst_0;
      fcmpl;
      ifeq L57;
      fload 4;
      iload_2;
      ///////////////////////////////////
      //---------------------------------
      //special insertion:

      bipush 10;
      multianewarray class [I, 1;
      pop;

      //---------------------------------
      ///////////////////////////////////
      i2f;
      fcmpl;
      ifeq L57;
      iconst_3;
      ireturn;
      endtry t45;
      catch t45 java/lang/ArrayIndexOutOfBoundsException;
      pop;
      iload_2;
      iflt L57;
      iload_2;
      iload_1;
      if_icmpge L57;
      iconst_2;
      ireturn;
      L57: iinc 3, 1;
      L60: iload_3;
      iload_1;
      iconst_5;
      imul;
      if_icmplt L8;
      iconst_0;
      ireturn;
      }

      public static Method run:"([Ljava/lang/String;Ljava/io/PrintStream;)I"
      stack 3 locals 3
      {
      new class java/util/Random;
      dup;
      invokespecial Method java/util/Random."<init>":"()V";
      putstatic Field rand:"Ljava/util/Random;";
      getstatic Field rand:"Ljava/util/Random;";
      ldc2_w long 123456789l;
      invokevirtual Method java/util/Random.setSeed:"(J)V";
      sipush 7944;
      newarray float;
      astore_2;
      aload_2;
      invokestatic Method randomWrite:"([F)I";
      ifne L39;
      aload_2;
      invokestatic Method randomRead:"([F)I";
      ifeq L41;
      L39: iconst_2;
      ireturn;
      L41: 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;
      invokespecial Method java/lang/Object."<init>":"()V";
      return;
      }

      } // end Class parse3001
      //---------------------

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

        Attachments

          Activity

            People

            • Assignee:
              mpalecznsunw Michael Paleczny (Inactive)
              Reporter:
              zsssunw Zss Zss (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: