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

C2's superword optimization causes unaligned memory accesses

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 8u60, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b66
    • Verification:
      Verified

      Backports

        Description

        C2's superword optimization generates unaligned memory accesses that cause crashes on systems that require proper address alignment (for example, Sparc):

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGBUS (0xa) at pc=0xffffffff7694984c, pid=2009, tid=2
        #
        # JRE version: Java(TM) SE Runtime Environment (9.0) (build 1.9.0-internal-fastdebug-tohartma_2015_04_14_10_06-b00)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-internal-fastdebug-tohartma_2015_04_14_10_06-b00 mixed mode solaris-sparc compressed oops)
        # Problematic frame:
        # J 5 C2 Test.copyByteToChar([B[B[CI)V (249 bytes) @ 0xffffffff7694984c [0xffffffff76949700+0x14c]
        #

        In this case the failing instruction is:

          0xffffffff7694984c: ldd [ %g5 + %l3 ], %f8

        Trying to load a double word (8 bytes) from byte[] src (see attached 'TestVectorizationWithInvariant.java'). The problem is that the address 0x00000005d57b3a3a (0b...1010) is not double word aligned.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  thartmann Tobias Hartmann
                  Reporter:
                  thartmann Tobias Hartmann
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: