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

Fragile memory barrier selection for some weak memory model platforms

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15, 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b18
    • CPU:
      aarch32

      Description

      JDK-8153224 introduced two usages of "support_IRIW_for_not_multiple_copy_atomic_cpu" to select a stronger memory barrier for platforms which are not multi-copy atomic.

      This looked wrong at the first glance for arm32 because it is not multi-copy atomic, but uses support_IRIW_for_not_multiple_copy_atomic_cpu = false.
      However, it seems to work, because OrderAcess::loadload() is implemented in a much stronger way than on other platforms. Relying on this in shared code is probably very unexpected to most developers. There should be a more comprehensive implementation.

      In addition, if support_IRIW_for_not_multiple_copy_atomic_cpu gets changed on PPC64 in the future (e.g. for experiments or for evaluating options for JEP 188: Java Memory Model Update) this will become incorrect for that platform, too.
      (There are no plans to support this officially. Just for experiments.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mdoerr Martin Doerr
              Reporter:
              mdoerr Martin Doerr
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: