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

Missing REX2 prefix accounting in ZGC barriers leads to incorrect encoding

XMLWordPrintable

      Following two tests fail when UseAPX is enabled.

      compiler/c2/irTests/gc/ReferenceClearTests.java
      compiler/c2/irTests/gc/ReferenceRefersToTests.java

      Issue can be reproduced consistantly if we changes the static register allocation order in x86_64.ad giving preference to EGPRs.

      --- OUTPUT TestFramework flag VM ---
      CompileCommand: inline compiler/c2/irTests/gc/ReferenceClearTests.* bool inline = true
      CompileCommand: inline java/lang/ref/Reference.* bool inline = true
      CompileCommand: inline java/lang/ref/PhantomReference.* bool inline = true
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007f796742ef46, pid=3471168, tid=3471175
      #
      # JRE version: OpenJDK Runtime Environment (25.0) (fastdebug build 25-internal-adhoc.root.jdk)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 25-internal-adhoc.root.jdk, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
      # Problematic frame:
      # J 203 c2 java.util.concurrent.ConcurrentHashMap.casTabAt([Ljava/util/concurrent/ConcurrentHashMap$Node;ILjava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$Node;)Z java.base@25-internal (20 bytes) @ 0x00007f796742ef46 [0x00007f796742ef00+0x0000000000000046]
      #
      # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      Unsupported internal testing APIs have been used.

      # An error report file with more information is saved as:
      # /home/jatinbha/sandboxes/apx-release/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_compiler_c2_irTests_gc_ReferenceClearTests_java/scratch/0/hs_err_pid3471168.log
      [30.767s][warning][os] Loading hsdis library failed

            jbhateja Jatin Bhateja
            jbhateja Jatin Bhateja
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: