Ensure release_store is paired with load_acquire in lock-free code

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • None
    • b137

      In the follow up to JDK-8154750 Zhengyu Gu wrote:
      >
      > In classLoader.hpp
      >
      > // Next entry in class path
      > ClassPathEntry* next() const { return _next; }
      > void set_next(ClassPathEntry* next) {
      > // may have unlocked readers, so write atomically.
      > OrderAccess::release_store_ptr(&_next, next);
      > }
      >
      > If there are unlocked readers, looks like that load_acquire is needed in
      > next() function.

      In general we need to verify store_release is always paired with load_acquire on lock-free paths.

            Assignee:
            David Holmes
            Reporter:
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: