[jdk11u-dev] RFR: 8351933: Inaccurate masking of TC subfield decrement in ForkJoinPool [v2]
Dmitry Chuyko
dchuyko at openjdk.org
Fri Jun 27 18:42:27 UTC 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] https://github.com/openjdk/jdk/pull/24034
Dmitry Chuyko has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge branch 'openjdk:master' into JDK-8351936
- RC_MASK and TC_MASK instead of UC_MASK
-------------
Changes:
- all: https://git.openjdk.org/jdk11u-dev/pull/3012/files
- new: https://git.openjdk.org/jdk11u-dev/pull/3012/files/5d0156c9..362a8007
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=3012&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=3012&range=00-01
Stats: 17997 lines in 529 files changed: 7977 ins; 5264 del; 4756 mod
Patch: https://git.openjdk.org/jdk11u-dev/pull/3012.diff
Fetch: git fetch https://git.openjdk.org/jdk11u-dev.git pull/3012/head:pull/3012
PR: https://git.openjdk.org/jdk11u-dev/pull/3012
More information about the jdk-updates-dev
mailing list