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

Atomic double and long assignment not enforced for volatiles

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.2.0
    • hotspot
    • None
    • generic
    • solaris_2.5.1

      The JLS section 17.4 describes that doubles and longs may be observed
      to be assigned as two 32 bit pieces, except if the variable in question
      is volatile. The VM does not align data items and use single instructions
      to make sure that assignments to volatile variables are atomic. Ideally,
      all such assignments could be atomic, not just variables declared
      volatile. Such a VM would pave the way for eventual removal of section
      17.4, which is a canker on the language.

            Unassigned Unassigned
            dstoutamsunw David Stoutamire (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: