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

[JVMCI] Make sure volatile fields are read as volatile during constant reflection.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 11, 12
    • hotspot
    • b15

      The ConstantReflectionProvider allows the read constants out of constant objects. Currently reads are performed with Unsafe using the standard get<Type> methods.
      Using the get<Type>Volatile methods for volatile fields would allow users of the ConstantReflectionProvider to have some guarantees when looking at volatile fields (e.g., reading fields in program order would yield a state that the program could observe).

            gdub Gilles Duboscq
            gdub Gilles Duboscq
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: