Race in field updates when creating ArrayKlasses can lead to crash

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 10
    • Affects Version/s: 8, 9
    • Component/s: hotspot
    • b21
    • Verified

      Klasses in HotSpot have a pointer to the Java mirror which the compiler considers to be non-null. This means that you should never be able to see the Klass before the _java_mirror has been set. When building ArrayKlasses, cross links are made between the element Class and the array Class. This creates an access to the newly created ArrayKlass before its _java_mirror has been set. If another thread see this value you can get a crash.

        1. ArraysNewInstanceBug.java
          2 kB
          Tom Rodriguez
        2. hs_err_pid43358.log
          44 kB
          Tom Rodriguez

            Assignee:
            Coleen Phillimore
            Reporter:
            Tom Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: