Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8351933: Inaccurate masking of TC subfield decrement in ForkJoinPool #3012

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dchuyko
Copy link
Member

@dchuyko dchuyko commented Mar 13, 2025

This a backport of JDK-8351933 [0] (PR [1]) for 11u. At one of code paths the TC subfield of ctl field is decremented and the result is not masked correctly. The target code is in runWorker() instead of tryTrim()/awaitWork() and the surrounding code is different from the current master, as well as the original mask name. The core change is the same, candidate for CTL.compareAndSet is constructed using '(RC_MASK & c) | (TC_MASK & (c - TC_UNIT))' instead of '(UC_MASK & (c - TC_UNIT))' to correctly preserve the RC subfield.

[0] https://bugs.openjdk.org/browse/JDK-8351933
[1] openjdk/jdk#24034


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8351933 needs maintainer approval

Issue

  • JDK-8351933: Inaccurate masking of TC subfield decrement in ForkJoinPool (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/3012/head:pull/3012
$ git checkout pull/3012

Update a local copy of the PR:
$ git checkout pull/3012
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/3012/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3012

View PR using the GUI difftool:
$ git pr show -t 3012

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/3012.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 13, 2025

👋 Welcome back dchuyko! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Mar 13, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport JDK-8351933 8351933: Inaccurate masking of TC subfield decrement in ForkJoinPool Mar 13, 2025
@openjdk
Copy link

openjdk bot commented Mar 13, 2025

This backport pull request has now been updated with the original issue, but not the original commit. If you have the original commit hash, please update the pull request title with Backport <hash>.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Mar 13, 2025
@mlbridge
Copy link

mlbridge bot commented Mar 13, 2025

Webrevs

@openjdk
Copy link

openjdk bot commented Mar 14, 2025

⚠️ @dchuyko This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants