Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8278309: [windows] use of uninitialized OSThread::_state
Reviewed-by: dholmes, shade
  • Loading branch information
tstuefe committed Dec 8, 2021
1 parent 10e0318 commit 54993b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hotspot/os/windows/os_windows.cpp
Expand Up @@ -676,6 +676,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
Expand Down Expand Up @@ -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
Expand Down

9 comments on commit 54993b1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@tstuefe
Copy link
Member Author

@tstuefe tstuefe commented on 54993b1 Dec 8, 2021

Choose a reason for hiding this comment

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

/backport jdku11-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 54993b1 Dec 8, 2021

Choose a reason for hiding this comment

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

@tstuefe The target repository jdku11-dev is not a valid target for backports.
List of valid target repositories: openjdk/jdk11u, openjdk/jdk11u-dev, openjdk/jdk12u, openjdk/jdk13u, openjdk/jdk13u-dev, openjdk/jdk14u, openjdk/jdk15u, openjdk/jdk15u-dev, openjdk/jdk16u, openjdk/jdk17u.
Supplying the organization/group prefix is optional.

@tstuefe
Copy link
Member Author

@tstuefe tstuefe commented on 54993b1 Dec 8, 2021

Choose a reason for hiding this comment

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

/backport openjdk/jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 54993b1 Dec 8, 2021

Choose a reason for hiding this comment

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

@tstuefe Could not automatically backport 54993b13 to openjdk/jdk11u-dev due to conflicts in the following files:

  • src/hotspot/os/windows/os_windows.cpp

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk11u-dev:

$ git checkout -b tstuefe-backport-54993b13
$ git fetch --no-tags https://git.openjdk.java.net/jdk 54993b13078ceb05736bb0e1d7ed7415c390442e
$ git cherry-pick --no-commit 54993b13078ceb05736bb0e1d7ed7415c390442e
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 54993b13078ceb05736bb0e1d7ed7415c390442e'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport 54993b13078ceb05736bb0e1d7ed7415c390442e.

@tstuefe
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk17u

@openjdk
Copy link

@openjdk openjdk bot commented on 54993b1 Dec 15, 2021

Choose a reason for hiding this comment

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

@tstuefe the backport was successfully created on the branch tstuefe-backport-54993b13 in my personal fork of openjdk/jdk17u. To create a pull request with this backport targeting openjdk/jdk17u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 54993b13 from the openjdk/jdk repository.

The commit being backported was authored by Thomas Stuefe on 8 Dec 2021 and was reviewed by David Holmes and Aleksey Shipilev.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u:

$ git fetch https://github.com/openjdk-bots/jdk17u tstuefe-backport-54993b13:tstuefe-backport-54993b13
$ git checkout tstuefe-backport-54993b13
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u tstuefe-backport-54993b13

@tstuefe
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 54993b1 Jan 13, 2022

Choose a reason for hiding this comment

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

@tstuefe the backport was successfully created on the branch tstuefe-backport-54993b13 in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 54993b13 from the openjdk/jdk repository.

The commit being backported was authored by Thomas Stuefe on 8 Dec 2021 and was reviewed by David Holmes and Aleksey Shipilev.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev tstuefe-backport-54993b13:tstuefe-backport-54993b13
$ git checkout tstuefe-backport-54993b13
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev tstuefe-backport-54993b13

Please sign in to comment.