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

Ensure release_store is paired with load_acquire in lock-free code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • 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.

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

              Created:
              Updated:
              Resolved: