diff src/share/vm/runtime/vmThread.cpp @ 17845:21dd1c827123

8033696: "assert(thread != NULL) failed: just checking" due to Thread::current() and JNI pthread interaction Reviewed-by: dholmes, dsamersoff Contributed-by: andreas.eriksson@oracle.com
author kevinw
date Wed, 02 Apr 2014 18:40:52 +0200
parents f2110083203d
children 78bbf4d43a14
line wrap: on
line diff
--- a/src/share/vm/runtime/vmThread.cpp	Tue Apr 08 14:55:16 2014 -0700
+++ b/src/share/vm/runtime/vmThread.cpp	Wed Apr 02 18:40:52 2014 +0200
@@ -316,6 +316,9 @@
     _terminate_lock->notify();
   }
 
+  // Thread destructor usually does this.
+  ThreadLocalStorage::set_thread(NULL);
+
   // Deletion must be done synchronously by the JNI DestroyJavaVM thread
   // so that the VMThread deletion completes before the main thread frees
   // up the CodeHeap.