8033696: "assert(thread != NULL) failed: just checking" due to Thread::current() and JNI pthread interaction

Reviewed-by: dholmes, dsamersoff
This commit is contained in:
Andreas Eriksson 2014-04-02 18:40:52 +02:00 committed by Kevin Walls
parent cf2bf09668
commit fbb7bd8781
3 changed files with 27 additions and 2 deletions

View file

@ -305,6 +305,9 @@ void VMThread::run() {
_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.