[jdk8u-dev] RFR: 8205399: Set node color on pinned HashMap.TreeNode deletion [v2]
Aleksey Shipilev
shade at openjdk.org
Fri Jul 7 13:24:11 UTC 2023
On Fri, 7 Jul 2023 09:48:03 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> See the issue for details. It reproduces in 8u, which breaks applications that run with `-ea -esa` for extra safety. We have seen at least two in-production bug reports due to this.
>>
>> The backport is not clean, because the test should reside in the different folder.
>>
>> The verification barfs on discovering the red root, when it also discovers left/right child node is also red. This technically violates one of the basic properties of RB trees: a red node should not have red children. We can always change (sub-)root node color from red to black without violating RB properties, as the path to any descendant node would still have the same number of black nodes. AFAIU, leaving the (sub-)root red and the child red could potentially break something else. This is why I believe this backport is required and safe for 8u.
>>
>> Additional testing:
>> - [x] Linux x86_64, new regression test fails without the patch, passes with it
>> - [x] Linux x86_64 `jdk_util`
>> - [x] Linux x86_64 fastdebug `tier1` (some intermittent failures, which look unrelated and present in current master)
>
> Aleksey Shipilev 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 'master' into JDK-8205399-hashmap-node
> - Backport 51d0a9e1223f218d10f8761e38cd2dd478607040
Testing is clean, push approval is here.
-------------
PR Comment: https://git.openjdk.org/jdk8u-dev/pull/325#issuecomment-1625407760
More information about the jdk8u-dev
mailing list