Skip to content

Commit

Permalink
[GR-44821] Check for native frames in DestroyJavaVM.
Browse files Browse the repository at this point in the history
PullRequest: graal/14103
  • Loading branch information
peter-hofer committed Mar 21, 2023
2 parents efcb517 + 70d5b78 commit e9893c0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
import com.oracle.svm.core.monitor.MonitorInflationCause;
import com.oracle.svm.core.monitor.MonitorSupport;
import com.oracle.svm.core.snippets.ImplicitExceptions;
import com.oracle.svm.core.stack.JavaFrameAnchors;
import com.oracle.svm.core.thread.PlatformThreads;
import com.oracle.svm.core.util.Utf8;

Expand Down Expand Up @@ -280,6 +281,9 @@ static int DetachCurrentThread(@SuppressWarnings("unused") JNIJavaVM vm) {
@CEntryPointOptions(prologue = JNIJavaVMEnterAttachThreadEnsureJavaThreadPrologue.class, epilogue = LeaveTearDownIsolateEpilogue.class)
@SuppressWarnings("unused")
static int DestroyJavaVM(JNIJavaVM vm) {
if (JavaFrameAnchors.getFrameAnchor().isNonNull()) {
return JNIErrors.JNI_ERR();
}
PlatformThreads.singleton().joinAllNonDaemons();
return JNIErrors.JNI_OK();
}
Expand Down

0 comments on commit e9893c0

Please sign in to comment.