Wrong volatile qualifier for field ClassLoaderDataGraphKlassIteratorAtomic::_next_klass

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 8u40, 9
    • Component/s: hotspot
    • None
    • gc
    • 9
    • b56

        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

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

                Created:
                Updated:
                Resolved: