--- a/src/hotspot/os/windows/os_windows.cpp Wed Nov 22 14:31:48 2017 -0500
+++ b/src/hotspot/os/windows/os_windows.cpp Wed Nov 22 17:54:50 2017 -0800
@@ -3490,9 +3490,7 @@
void os::hint_no_preempt() {}
void os::interrupt(Thread* thread) {
- assert(!thread->is_Java_thread() || Thread::current() == thread ||
- Threads_lock->owned_by_self(),
- "possibility of dangling Thread pointer");
+ debug_only(Thread::check_for_dangling_thread_pointer(thread);)
OSThread* osthread = thread->osthread();
osthread->set_interrupted(true);
@@ -3513,8 +3511,7 @@
bool os::is_interrupted(Thread* thread, bool clear_interrupted) {
- assert(!thread->is_Java_thread() || Thread::current() == thread || Threads_lock->owned_by_self(),
- "possibility of dangling Thread pointer");
+ debug_only(Thread::check_for_dangling_thread_pointer(thread);)
OSThread* osthread = thread->osthread();
// There is no synchronization between the setting of the interrupt