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

JVMCI: expected int64_t but JavaThread::_held_monitor_count is of type intx

XMLWordPrintable

      Found this exception while running graal with latest JDK mainline repo

      jdk.vm.ci.common.JVMCIError: expected type int64_t but VM field JavaThread::_held_monitor_count is of type intx
      at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotVMConfigAccess.getField(HotSpotVMConfigAccess.java:319)
      at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotVMConfigAccess.getFieldOffset0(HotSpotVMConfigAccess.java:165)
      at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotVMConfigAccess.getFieldOffset(HotSpotVMConfigAccess.java:147)
      at jdk.internal.vm.compiler@21-internal/org.graalvm.compiler.hotspot.GraalHotSpotVMConfigAccess.getFieldOffset(GraalHotSpotVMConfigAccess.java:329)
      at jdk.internal.vm.compiler@21-internal/org.graalvm.compiler.hotspot.GraalHotSpotVMConfig.<init>(GraalHotSpotVMConfig.java:757)
      at jdk.internal.vm.compiler@21-internal/org.graalvm.compiler.hotspot.HotSpotGraalRuntime.<init>(HotSpotGraalRuntime.java:131)
      at jdk.internal.vm.compiler@21-internal/org.graalvm.compiler.hotspot.HotSpotGraalCompilerFactory.createCompiler(HotSpotGraalCompilerFactory.java:212)
      at jdk.internal.vm.compiler@21-internal/org.graalvm.compiler.hotspot.HotSpotGraalCompilerFactory.createCompiler(HotSpotGraalCompilerFactory.java:190)
      at jdk.internal.vm.compiler@21-internal/org.graalvm.compiler.hotspot.HotSpotGraalCompilerFactory.createCompiler(HotSpotGraalCompilerFactory.java:53)
      at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.getCompiler(HotSpotJVMCIRuntime.java:806)

      Latest graal source code still has this:

      https://github.com/oracle/graal/blob/d7158db906123c63ce970e535b6b3ee57574210b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java#L772-L774

              if (JDK >= 20) {
                  offset = getFieldOffset("JavaThread::_held_monitor_count", Integer.class, "int64_t");
                  isWord = true;
              }

      But recently HotSpot refactoring in JDK-8313882 has changed this field to "intx"


            dnsimon Douglas Simon
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: