changeset 60560:60a0bfdf44b8

8241296: Segfault in JNIHandleBlock::oops_do() Reviewed-by: stefank
author aph
date Thu, 19 Mar 2020 14:53:57 +0000
parents 7e5a53043493
children 132be3e5f9ee
files src/hotspot/share/runtime/thread.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/runtime/thread.cpp	Fri Mar 20 05:19:56 2020 -0700
+++ b/src/hotspot/share/runtime/thread.cpp	Thu Mar 19 14:53:57 2020 +0000
@@ -888,7 +888,9 @@
 }
 
 void Thread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
-  active_handles()->oops_do(f);
+  if (active_handles() != NULL) {
+    active_handles()->oops_do(f);
+  }
   // Do oop for ThreadShadow
   f->do_oop((oop*)&_pending_exception);
   handle_area()->oops_do(f);