--- old/src/share/vm/runtime/thread.cpp 2016-08-02 20:57:03.214174887 -0400 +++ new/src/share/vm/runtime/thread.cpp 2016-08-02 20:57:01.830096725 -0400 @@ -374,11 +374,14 @@ delete handle_area(); delete metadata_handles(); + // SR_handler uses this as a termination indicator - + // needs to happen before os::free_thread() + delete _SR_lock; + _SR_lock = NULL; + // osthread() can be NULL, if creation of thread failed. if (osthread() != NULL) os::free_thread(osthread()); - delete _SR_lock; - // clear Thread::current if thread is deleting itself. // Needed to ensure JNI correctly detects non-attached threads. if (this == Thread::current()) {