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

[aarch64] SIGBUS by unaligned Unsafe compare_and_swap

XMLWordPrintable

    • b30
    • aarch64

        On aarch64, SIGBUS happens when Unsafe compareAndSwapLong and compareAndSwapInt are used to access unaligned mem address.
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGBUS (0x7) at pc=0x0000ffffb164c9f8, pid=12497, tid=12498
        #
        # JRE version: OpenJDK Runtime Environment (15.0) (build 15-internal+0-adhoc.zhuorenwz.jdk)
        # Java VM: OpenJDK 64-Bit Server VM (15-internal+0-adhoc.zhuorenwz.jdk, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-aarch64)
        # Problematic frame:
        # V [libjvm.so+0xc7a9f8] Unsafe_CompareAndSetInt+0xb8
        This crash only happens in interpreter, and in C1/C2 compiled code InternalError will be thrown. InternalError should also be thrown in interpreter.
        It can be reproduced by the attached files.

          1. TestSwapInt.java
            0.7 kB
            Wang Zhuo
          2. TestSwapLong.java
            0.8 kB
            Wang Zhuo

              wzhuo Wang Zhuo
              wzhuo Wang Zhuo
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: