< prev index next >

src/hotspot/share/runtime/jniHandles.cpp

Print this page

        

@@ -325,11 +325,17 @@
 
 void JNIHandles::verify() {
   VerifyJNIHandles verify_handle;
 
   oops_do(&verify_handle);
-  weak_oops_do(&verify_handle);
+#if INCLUDE_ZGC
+  // In ZGC, JNI weaks are handled concurrently, so they can't be verified here
+  if (!UseZGC)
+#endif
+  {
+    weak_oops_do(&verify_handle);
+  }
 }
 
 // This method is implemented here to avoid circular includes between
 // jniHandles.hpp and thread.hpp.
 bool JNIHandles::current_thread_in_native() {
< prev index next >