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

WB_IsIntrinsicAvailable failed with "compiler not available" with option -Xint

XMLWordPrintable

      When running testcase compiler/codegen/aes/TestAESMain.java with option "-Xint", it will crash with "assert(comp != __null) failed: compiler not available" on a debug-level build or SIGSEGV on a release-level build.

      Zhang Quan will own this issue.

      Steps to Reproduce
      jtreg -v:fail,error -nr -w tmp -Xint -jdk:path/to/jdk/build test/hotspot/jtreg/compiler/codegen/aes/TestAESMain.java

      run result with release build
      ```
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007f85e7d85522, pid=112075, tid=112092
      #
      # Problematic frame:
      # V [libjvm.so+0xf77522] WB_IsIntrinsicAvailable+0x292
      #
      ```

      run result with fast debug build
      ```
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/lusou.zq/workspace/ajdk/dragonwell11/src/hotspot/share/prims/whitebox.cpp:824), pid=73463, tid=73507
      # assert(comp != __null) failed: compiler not available
      #
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 11.0.20-internal+0-adhoc, interpreted mode, compressed oops, g1 gc, linux-amd64)
      #
      ```

      This bug is caused by the absent of compiler when JVM is running in pure interpreter mode with option "-Xint". We can fix it by setting the highest compile level to be CompLevel_none if "-Xint" is enabled, and WB_IsIntrinsicAvailable will return false directly rather than trying to get and use the non-existed compiler.

            Unassigned Unassigned
            jzhu Joshua Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: