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

[JVMCI] support libgraal isolate shutdown when last detaching thread is native

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 11, 17, 18, 19, 20
    • hotspot

      Currently, a libgraal isolate will shut down when the last thread associated with the isolate is detached from HotSpot. There is however, one corner case where this does not currently work. When a thread started by libgraal itself (as opposed to a thread started by the CompileBroker) is the last to detach, the VM cannot call DestroyJavaVM on the isolate as there are still libgraal frames on the stack. Returning to these frame after the isolate has been destroyed would lead to undefined behavior.

      The proposed solution in this scenario is for HotSpot to fork a thread that calls DestroyJavaVM in libgraal.

            dnsimon Douglas Simon
            dnsimon Douglas Simon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: