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

Access Violation + Segmentation Fault in JVM (Hotspot Compiler)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 6u10
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_11"
      Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
      Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)

      java version "1.6.0_10"
      Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
      Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)


      FULL OS VERSION :
      Microsoft Windows XP [Version 5.1.2600]

      Linux XXXdesktop 2.6.24-22-generic #1 SMP Mon Nov 24 18:32:42 UTC 2008 i686 GNU/Linux

      SunOS io 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-480R



      A DESCRIPTION OF THE PROBLEM :
      Attached sample code causes access violation exceptions on windows and segmentation faults on linux and solaris.

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: No

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      javac -g:none BugTest.java
      java -server BugTest

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected:
       infinite loop

      Actual:
       seg fault

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Attached seperatly


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public final class BugTest {

        public static void main(String[] args) {
          BugTest b = new BugTest();
          while (true) {
            b.crashTimeParty();
          }
        }

        private void crashTimeParty() {
          int i = 0;
          int j = 0;

          if (someThing == 1)
            do {
              if (++i == 10)
                return;
            } while (true);
          else
            // This section isn't actually entered
            do {
              int x = 0;

              // Remove any of these = good.
              o[0] = myJ[x];
              o[0] = myJ[x];
              o[0] = myJ[x];
              o[0] = myJ[x];
              o[0] = myJ[x];
              o[0] = myJ[x];
              o[0] = myJ[x];
              o[0] = myJ[x];
              o[0] = myJ[x];
              
              if (++i == 6) // <=5 good. >=6 bad.
                return;
              
              // Remove this = good.
              o[0] = myJ[x];
            } while (true);
        }

        private int someThing = 1;

        private int o[] = null; // never really referenced.

        static final int[] myJ = new int[256];

        static final int a[] = null; // never really referenced.

      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Turn of the native compiler - however - our potential customers are interested in seeing the better performance that the compiler offers.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              twisti Christian Thalinger
              Reporter:
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: