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

C2 Compilation failure when accessing off-heap memory using Unsafe

    Details

    • Subcomponent:
    • Resolved In Build:
      b14
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        A user reported misbehaving off-heap access. It looks like a C2 compilation failure that seems to only trigger with Shenandoah:

        https://mail.openjdk.java.net/pipermail/shenandoah-dev/2019-March/009060.html

        Eg with G1 generates this assembly for swapping two array elements:
        mov (%r8),%r9d
        mov (%r10),%r11d
        mov %r9d,(%r10)
        mov %r11d,(%r8)

        While with Shenandoah we get this:
        mov (%r9),%ecx
        mov %ecx,(%r10,%r11,1)
        mov %ecx,(%r9)

        I.e. the two loads seem to have been wrongly coalesced into one.

        Even though that is only triggered by Shenandoah, it seems to be a legit and generic C2 problem.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rkennke Roman Kennke
                  Reporter:
                  rkennke Roman Kennke
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: