You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lowering of MonitorEnterNode and MonitorExitNode in Graal21 has an issue where it "pushes" more arguments than needed by the callee (monitorenterStub and monitorexitStub, respectively) when JVMCIUseFastLocking is disabled. See Stacktrace of the error below.
Thread[#19,JVMCI-native CompilerThread2,5,main]: Compilation of java.util.concurrent.ConcurrentHashMap.putVal(Object, Object, boolean) @ -1 failed: java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.SnippetTemplate$Arguments.addConst(SnippetTemplate.java:641)
at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.SnippetTemplate$Arguments.addConst(SnippetTemplate.java:636)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.replacements.MonitorSnippets$Templates.lower(MonitorSnippets.java:911)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.meta.DefaultHotSpotLoweringProvider.lowerWithoutDelegation(DefaultHotSpotLoweringProvider.java:459)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.meta.DefaultHotSpotLoweringProvider.lower(DefaultHotSpotLoweringProvider.java:629)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.amd64.AMD64HotSpotLoweringProvider.lower(AMD64HotSpotLoweringProvider.java:87)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.spi.Lowerable.lower(Lowerable.java:40)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.common.LoweringPhase.process(LoweringPhase.java:665)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.common.LoweringPhase$ProcessFrame.preprocess(LoweringPhase.java:553)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.common.LoweringPhase.processBlock(LoweringPhase.java:764)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.common.LoweringPhase.lower(LoweringPhase.java:297)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.common.LoweringPhase.run(LoweringPhase.java:271)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.common.LoweringPhase.run(LoweringPhase.java:113)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:434)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:322)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.phases.BaseTier.run(BaseTier.java:47)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:434)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:322)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.emitFrontEnd(GraalCompiler.java:304)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:169)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compileGraph(GraalCompiler.java:137)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileHelper(HotSpotGraalCompiler.java:244)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compile(HotSpotGraalCompiler.java:259)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.CompilationTask$HotSpotCompilationWrapper.performCompilation(CompilationTask.java:202)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.CompilationTask$HotSpotCompilationWrapper.performCompilation(CompilationTask.java:108)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.CompilationWrapper.run(CompilationWrapper.java:222)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.CompilationTask.runCompilation(CompilationTask.java:382)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.CompilationTask.runCompilation(CompilationTask.java:357)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:159)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:693)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:110)
at [jdk.internal.vm.ci@21.0.6](mailto:jdk.internal.vm.ci@21.0.6)/jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.compileMethod(HotSpotJVMCIRuntime.java:924)
Steps to reproduce the issue
Just run any reasonably sized program with -XX:-JVMCIUseFastLocking.
GraalVM Community Build
Built from sources using latest version available in graalvm-community-jdk21u repo and applying the changes in this pull request.
Describe the Issue
The lowering of MonitorEnterNode and MonitorExitNode in Graal21 has an issue where it "pushes" more arguments than needed by the callee (monitorenterStub and monitorexitStub, respectively) when JVMCIUseFastLocking is disabled. See Stacktrace of the error below.
Steps to reproduce the issue
Just run any reasonably sized program with -XX:-JVMCIUseFastLocking.
GraalVM Community Build
Built from sources using latest version available in graalvm-community-jdk21u repo and applying the changes in this pull request.
GraalVM Version
#41
Operating System and Version
Not OS specific.
Architecture
Not architecture specific.
The text was updated successfully, but these errors were encountered: