Skip to content
Permalink
Browse files
8278309: [windows] use of uninitialized OSThread::_state
Backport-of: 54993b13078ceb05736bb0e1d7ed7415c390442e
  • Loading branch information
tstuefe committed Jan 14, 2022
1 parent 78e2153 commit 84457e5f4202fc5502067ad94b8d8f9a1156a641
Showing 1 changed file with 4 additions and 1 deletion.
@@ -681,6 +681,9 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
return false;
}

// Initial state is ALLOCATED but not INITIALIZED
osthread->set_state(ALLOCATED);

// Initialize the JDK library's interrupt event.
// This should really be done when OSThread is constructed,
// but there is no way for a constructor to report failure to
@@ -777,7 +780,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
osthread->set_thread_handle(thread_handle);
osthread->set_thread_id(thread_id);

// Initial thread state is INITIALIZED, not SUSPENDED
// Thread state now is INITIALIZED, not SUSPENDED
osthread->set_state(INITIALIZED);

// The thread is returned suspended (in state INITIALIZED), and is started higher up in the call chain

1 comment on commit 84457e5

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 84457e5 Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.