[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-core-libs-dev
Subject:    Re: RFR: 8003417: WeakHashMap$HashIterator removes wrong entry
From:       Jaikiran Pai <jpai () openjdk ! java ! net>
Date:       2021-11-29 9:15:07
Message-ID: tSNo4xk7-Qn3-dJrWgkLvgRebaAhKXdvHaCw2dfoqX0=.7bfee9c4-5d02-4f84-83ea-ab38b88e83d9 () github ! com
[Download RAW message or body]

On Sat, 20 Nov 2021 10:08:41 GMT, Jaikiran Pai <jpai@openjdk.org> wrote:

> Can I please get a review for this change which proposes to fix the issue reported \
> in https://bugs.openjdk.java.net/browse/JDK-8003417? 
> The issue notes that this is applicable for `WeakHashMap` which have `null` keys. \
> However, the issue is even applicable for `WeakHashMap` instances which don't have \
> `null` keys, as reproduced and shown by the newly added jtreg test case in this PR. \
>  The root cause of the issue is that once the iterator is used to iterate till the \
> end and the `remove()` is called, then the `WeakHashMap$HashIterator#remove()` \
> implementation used to pass `null` as the key to remove from the map, instead of \
> the key of the last returned entry. The commit in this PR fixes that part. 
> A new jtreg test has been added which reproduces the issue as well as verifies the \
> fix. `tier1` testing and this new test have passed after this change. However, I \
> guess this will require a JCK run to be run too, perhaps? If so, I will need help \
> from someone who has access to them to have this run against those please.

Any reviews for this change, please?

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

PR: https://git.openjdk.java.net/jdk/pull/6488


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic