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

[JVMCI] Deoptimization in synchronized methods can lead to a crash or exception when using EnableJVMCI but not UseJVMCICompiler

    • b33

      JVMCI supports deoptimizing in a synchronized method before the monitor has been acquired. This works by setting JavaThread::_pending_monitorenter and reading it in the interpreter deop entry.
      Currently the code in the deopt entry point is only emitted if UseJVMCICompiler or UseAOT are enabled.
      If EnableJVMCI is enabled but neither UseAOT or UseJVMCICompiler are enabled, this can lead to a crash or an exception since the monitorenter of a synchronized method compiled by Graal will not be performed.

      The attached patch should resolve the issue.

            gdub Gilles Duboscq
            gdub Gilles Duboscq
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: