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

Lazy initialization of static value fields may cause invalid behavior

    XMLWordPrintable

    Details

      Description

      Static value fields are initialized lazily. Initialized to NULL during the creation of the Java mirror, they are currently updated to point to the default value on the first getstatic. This behavior may lead to incorrect behavior if the lazy update in getstatic erase the result of of putstatic executed concurrently.
      Update in getstatic should either be removed (and let the NULL pointer until the first putstatic) or be changed into a CAS.

        Attachments

          Activity

            People

            Assignee:
            fparain Frederic Parain
            Reporter:
            fparain Frederic Parain
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: