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

Executable.hasRealParameterData should not be volatile

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • None
    • core-libs
    • None

      If there are two threads calling Executable.hasRealParameterData() under race and the first one writes into volatile Executable.parameters field (doing releasing store) and the second thread reads non-null value from the same field (doing acquiring read) then it must read exactly the same value written into hasRealParameterData within privateGetParameters().

      In the opposite case (acquiring read reads null) the second thread writes the value itself and returns it from the method.

            stsypanov Sergey Tsypanov
            stsypanov Sergey Tsypanov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: