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

C2: array load may float above range check

    XMLWordPrintable

Details

    • b12
    • Verified

    Backports

      Description

        Attached test case run with:

        java -XX:-TieredCompilation -XX:-BackgroundCompilation TestArrayAccessAboveRCAfterSplitIf

        fails with:

        # SIGSEGV (0xb) at pc=0x00007fd5d9056204, pid=2781800, tid=2781801
        #
        # JRE version: OpenJDK Runtime Environment (23.0) (slowdebug build 23-internal-adhoc.roland.jdk-jdk2)
        # Java VM: OpenJDK 64-Bit Server VM (slowdebug 23-internal-adhoc.roland.jdk-jdk2, mixed mode, compressed oops, compressed class ptrs, serial gc, linux-amd64)
        # Problematic frame:
        # J 13 c2 TestArrayAccessAboveRCAfterSplitIf.test([I[IIIZ)I (68 bytes) @ 0x00007fd5d9056204 [0x00007fd5d90561e0+0x0000000000000024]

        In that case, split if inserts a Region between a range check and a dependent array load. The array load becomes dependent on some unrelated condition after the Region is later optimized out. That unrelated condition is subsumed by a dominating identical condition and the array load floats above the range check.

        I expect some other transformation can cause similar failures.

        Attachments

          Issue Links

            Activity

              People

                roland Roland Westrelin
                roland Roland Westrelin
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: