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

Ensure release_store is paired with load_acquire in lock-free code

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b137

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: