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

Fix specs for updateAndGet and related methods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs

        Doug Lea writes:

        The "...and all other read-and-update operations" clause
        inadvertently disappeared while meshing j.u.c.atomic specs
        with jdk9 VarHandles
        (http://download.java.net/java/jdk9/docs/api/java/lang/invoke/VarHandle.html)

        The updateAndGet method is not a part of VarHandles, so is no longer
        covered by any existing statement. We will need to somehow do so.

        http://markmail.org/thread/wrlo7tuajszbauqe#query:+page:1+mid:5ckdsgpbucpagn4b+state:results
        http://markmail.org/thread/wrlo7tuajszbauqe

        ---

        In addition Doug writes:

        On 05/25/2017 01:15 PM, Gil Tene wrote:
        >> (http://download.java.net/java/jdk9/docs/api/java/lang/invoke/VarHandle.html)
        > While on this subject, was the relative "weakening" of compareAndSet
        > (and other) memory semantics between Java 8 and java 9 discussed
        > elsewhere?

        The was no intention to weaken CAS specs. But in an attempt to clarify
        distinctions across new variants (compareAndExchangeRelease
        etc), the fact that the volatile-write property is unconditional
        here got lost. This also needs to be fixed.

              dl Doug Lea
              martin Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: