[jdk8u-dev] RFR: 8214427: probable bug in logic of ConcurrentHashMap.addCount()

Andrew John Hughes andrew at openjdk.java.net
Sun May 29 16:28:46 UTC 2022


On Sat, 19 Mar 2022 07:57:49 GMT, Poison <duke at openjdk.java.net> wrote:

> 8214427: probable bug in logic of ConcurrentHashMap.addCount()
> 
> This backport fixes the problem that the MAX_RESIZERS control does not take effect when multi-threaded expansion in ConcurrentHashMap.

I've opened a PR for the 11u backport: https://github.com/openjdk/jdk11u-dev/pull/1114

Can you merge this with jdk8u-dev/master so that the full set of build checks run?

I've see some whitespace differences with the 8u version:


-+                        (nt = nextTable) == null || transferIndex <= 0)
++                            (nt = nextTable) == null || transferIndex <= 0)



-+                    transferIndex <= 0)
++                        transferIndex <= 0)


Do you see this locally or is it introduced by the `webrev` tool?

The change from `compareAndSetInt` to `compareAndSwapInt` looks correct to match the 8u version.

-------------

PR: https://git.openjdk.java.net/jdk8u-dev/pull/18


More information about the jdk8u-dev mailing list