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

Clarify VarHandle set/get access on 32-bit platforms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • 24
    • core-libs

      The VarHandle methods on MethodHandles, byteArrayViewVarHandle, byteArrayViewVarHandle, and memorySegmentViewVarHandle state:

           * If access is aligned then following access modes are supported and are
           * guaranteed to support atomic access:
           * <ul>
           * <li>read write access modes for all {@code T}, with the exception of
           * access modes {@code get} and {@code set} for {@code long} and
           * {@code double} on 32-bit platforms.

      This is misleading, aligned access for modes get/set is supported on 32-bit systems but access is not guaranteed to be atomic and therefore may lead to word tearing.

            Unassigned Unassigned
            psandoz Paul Sandoz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: