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

large constant pool crashes VM

    XMLWordPrintable

Details

    • 1.2fcs
    • x86, sparc
    • solaris_2.5.1, solaris_2.6, windows_nt
    • Verified

    Description



      Name: laC46010 Date: 07/28/98


         All VM version (1.0-1.2FCS-C) crash on all platforms while
      execute classfile with constant pool with a big quantity of literals.
      Segmentation violation occurs if a classfile contains from 16384 to
      32768 double literals or from 32768 to 65536 float literals. It is
      reproduced with or without jit.
         The same happens when 10922 and more methods declared in one
      classfile.

      The program which generates an example and VM diagnostics follow:
      -----------------------------------------------------------------
      cat test1.java
      class test1 {

         static int ARRAY_N = 4; /* Array number */
         static int CPA = 4096; /* Constants per array, use 8192 for float */
         static int CPL = 10; /* Constants per line */
         static String TYPE = "double";/* Array type, use "float" for float */
         static String TS = ".0"; /* Constants suffix, use "f" for float */

          public static void main(String[] argv) {
            int TOTAL = 0;
            System.out.print("import java.io.PrintStream;\n\n");
            System.out.print( "class test {\n\n");
            for (int i = 0; i < ARRAY_N; ++i) {
               int COUNT = 0;
               System.out.print(" static "+TYPE+"[] arr"+i+";\n");
               System.out.print(" static void m"+i+"() {\n");
               System.out.print(" arr"+i+" = new "+TYPE+"[] {\n");
               for (int l = 0; l <= CPA/CPL; l++) {
                  String const_line = " ";
                  for (int j = 0; (j < CPL) && (COUNT++ < CPA); j++)
                    const_line = const_line + (j==0 && l==0 ? "":",") + TOTAL++ + TS;
                  System.out.println(const_line);
               }
               System.out.print(" };\n }\n");
            }
            System.out.println(" public static void main(String args[]) { System.out.println(\"Ok\"); }");
            System.out.println("}");
         }
      }

      > uname -a
      SunOS novo35 5.5.1 Generic_103640-12 sun4m sparc SUNW,SPARCstation-20
      > javac test1.java
      > java test1 > test.java
      > javac test.java
      > java -version
      java version "1.2fcs"
      Classic VM (build JDK-1.2fcs-C, green threads, sunwjit)
      > java -verify test
      SIGSEGV 11* segmentation violation
          si_signo [11]: SIGSEGV 11* segmentation violation
          si_errno [0]: Error 0
          si_code [1]: SEGV_MAPERR [addr: 0x52590814]

              stackpointer=EFFFED64

      Full thread dump:
          "Finalizer" (TID:0xebc99688, sys_thread_t:0x7a0d0, state:CW) prio=8
              at java.lang.Object.wait(Native Method)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:113)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:128)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:128)
          "Reference Handler" (TID:0xebc996e0, sys_thread_t:0x73ec8, state:CW) prio=10
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Object.java:303)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
          "Signal dispatcher" (TID:0xebc99730, sys_thread_t:0x6b778, state:CW) prio=10
          "main" (TID:0xebc99520, sys_thread_t:0x287e8, state:R) prio=5 *current thread*
      Monitor Cache Dump:
          java.lang.ref.Reference$Lock@EBC996F0/EBCD1268: <unowned>
              Waiting to be notified:
                  "Reference Handler" (0x73ec8)
          java.lang.ref.ReferenceQueue$Lock@EBC99698/EBCD1608: <unowned>
              Waiting to be notified:
                  "Finalizer" (0x7a0d0)
          java.lang.Class@EBC9D178/EBD5D508: owner "main" (0x287e8) 1 entry
      Registered Monitor Dump:
          PCMap lock: <unowned>
          utf8 hash table: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class linking lock: <unowned>
          System class loader lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Monitor cache lock: <unowned>
          Dynamic loading lock: <unowned>
          Monitor IO lock: <unowned>
          User signal monitor: <unowned>
              Waiting to be notified:
                  "Signal dispatcher" (0x6b778)
          Child death monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
              Waiting to be notified:
                  "Internal clock" (0x2b6b0)
          Thread queue lock: <unowned>
          Monitor registry: owner "main" (0x287e8) 1 entry
      SIGABRT 6* abort (generated by abort(3) routine)
          si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine)
          si_errno [0]: Error 0
          si_code [0]: SI_USER [pid: 6067, uid: 1186]
              stackpointer=EFFFED64

      Full thread dump:
          "Finalizer" (TID:0xebc99688, sys_thread_t:0x7a0d0, state:CW) prio=8
              at java.lang.Object.wait(Native Method)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:113)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:128)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:128)
          "Reference Handler" (TID:0xebc996e0, sys_thread_t:0x73ec8, state:CW) prio=10
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Object.java:303)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
          "Signal dispatcher" (TID:0xebc99730, sys_thread_t:0x6b778, state:CW) prio=10
          "main" (TID:0xebc99520, sys_thread_t:0x287e8, state:R) prio=5 *current thread*
      Monitor Cache Dump:
          java.lang.ref.Reference$Lock@EBC996F0/EBCD1268: <unowned>
              Waiting to be notified:
                  "Reference Handler" (0x73ec8)
          java.lang.ref.ReferenceQueue$Lock@EBC99698/EBCD1608: <unowned>
              Waiting to be notified:
                  "Finalizer" (0x7a0d0)
          java.lang.Class@EBC9D178/EBD5D508: owner "main" (0x287e8) 1 entry
      Registered Monitor Dump:
          PCMap lock: <unowned>
          utf8 hash table: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class linking lock: <unowned>
          System class loader lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Monitor cache lock: <unowned>
          Dynamic loading lock: <unowned>
          Monitor IO lock: <unowned>
          User signal monitor: <unowned>
              Waiting to be notified:
                  "Signal dispatcher" (0x6b778)
          Child death monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
              Waiting to be notified:
                  "Internal clock" (0x2b6b0)
          Thread queue lock: <unowned>
          Monitor registry: owner "main" (0x287e8) 1 entry
      Abort (core dumped)
      > java_g -verify test
      SIGSEGV 11* segmentation violation
          si_signo [11]: SIGSEGV 11* segmentation violation
          si_errno [0]: Error 0
          si_code [1]: SEGV_MAPERR [addr: 0x83111000]

              stackpointer=EFFFEBFC

      Full thread dump:
          "Finalizer" (TID:0xebc99698, sys_thread_t:0x6e178, state:CW) prio=8
              at java.lang.Object.wait(Native Method)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:113)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:128)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:128)
          "Reference Handler" (TID:0xebc996f0, sys_thread_t:0x75c60, state:CW) prio=10
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Object.java:303)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
          "Signal dispatcher" (TID:0xebc99728, sys_thread_t:0x62668, state:CW) prio=10
          "main" (TID:0xebc99530, sys_thread_t:0x287a0, state:R) prio=5 *current thread*
      Monitor Cache Dump:
          java.lang.ref.ReferenceQueue$Lock@EBC996A8/EBCD1E38: <unowned>
              Waiting to be notified:
                  "Finalizer" (0x6e178)
          java.lang.ref.Reference$Lock@EBC99700/EBCD1A60: <unowned>
              Waiting to be notified:
                  "Reference Handler" (0x75c60)
          java.lang.Class@EBC9D190/EBD5E410: owner "main" (0x287a0) 1 entry
      Registered Monitor Dump:
          PCMap lock: <unowned>
          utf8 hash table: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class linking lock: <unowned>
          System class loader lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Monitor cache lock: <unowned>
          Dynamic loading lock: <unowned>
          Monitor IO lock: <unowned>
          User signal monitor: <unowned>
              Waiting to be notified:
                  "Signal dispatcher" (0x62668)
          Child death monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
              Waiting to be notified:
                  "Internal clock" (0x2b668)
          Thread queue lock: <unowned>
          Monitor registry: owner "main" (0x287a0) 1 entry

      *** panic: "../../../../../src/solaris/hpi/green_threads/src/signals.c", line 612: assertion failure


      *** panic: "../../../../../src/solaris/hpi/green_threads/src/signals.c", line 612: assertion failure

      SIGABRT 6* abort (generated by abort(3) routine)
          si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine)
          si_errno [0]: Error 0
          si_code [0]: SI_USER [pid: 7036, uid: 1186]
              stackpointer=EFFFEBFC

      Full thread dump:
          "Finalizer" (TID:0xebc99698, sys_thread_t:0x6e178, state:CW) prio=8
              at java.lang.Object.wait(Native Method)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:113)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:128)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:128)
          "Reference Handler" (TID:0xebc996f0, sys_thread_t:0x75c60, state:CW) prio=10
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Object.java:303)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
          "Signal dispatcher" (TID:0xebc99728, sys_thread_t:0x62668, state:CW) prio=10
          "main" (TID:0xebc99530, sys_thread_t:0x287a0, state:R) prio=5 *current thread*
      Monitor Cache Dump:
          java.lang.ref.ReferenceQueue$Lock@EBC996A8/EBCD1E38: <unowned>
              Waiting to be notified:
                  "Finalizer" (0x6e178)
          java.lang.ref.Reference$Lock@EBC99700/EBCD1A60: <unowned>
              Waiting to be notified:
                  "Reference Handler" (0x75c60)
          java.lang.Class@EBC9D190/EBD5E410: owner "main" (0x287a0) 1 entry
      Registered Monitor Dump:
          PCMap lock: <unowned>
          utf8 hash table: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class linking lock: <unowned>
          System class loader lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Monitor cache lock: <unowned>
          Dynamic loading lock: <unowned>
          Monitor IO lock: <unowned>
          User signal monitor: <unowned>
              Waiting to be notified:
                  "Signal dispatcher" (0x62668)
          Child death monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
              Waiting to be notified:
                  "Internal clock" (0x2b668)
          Thread queue lock: <unowned>
          Monitor registry: owner "main" (0x287a0) 1 entry

      *** panic: "../../../../../src/solaris/hpi/green_threads/src/signals.c", line 612: assertion failure

      Abort (core dumped)
      -------------------------------------------------------

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

      Attachments

        Activity

          People

            hongzh Hong Zhang
            leosunw Leo Leo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: