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

JVM_Clone doesn't respect volatile long/double declarations

XMLWordPrintable

    • b32
    • generic
    • generic

      Experience with 4839641 has shown us that JVM_Clone uses word-at-a-time
      copying. If an object contains volatile long or volatile double fields,
      then this copying may produce a clone that isn't a valid copy of the
      original. In particular, if another thread is modifying a volatile
      long or double field while the clone is being made, the clone may see
      one word of the field from before the modification and one word from
      after the modification, resulting in a value that was never in the
      field. That would violate the specification of Object.clone.

            phh Paul Hohensee
            pbk Peter Kessler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: