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

Wrong volatile qualifier for field ClassLoaderDataGraphKlassIteratorAtomic::_next_klass

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u40, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Introduced In Version:
      9
    • Resolved In Build:
      b56

      Backports

        Description

        I investigated a crash in ClassLoaderDataGraphKlassIteratorAtomic::next_klass_in_cldg where class is 0. This can happen as _next_klass is changed concurrently, but is not correctly qualified as volatile.
        The declaration volatile Klass* _next_klass indicates that the Klass object may change, but actually the pointer is changed.

        I have seen the crash on linux s390x

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                asiebenborn Axel Siebenborn
                Reporter:
                asiebenborn Axel Siebenborn
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: