Integrated: 8251397: NPE on ClassValue.ClassValueMap.cacheArray
Galder Zamarreño
github.com+50187+galderz at openjdk.java.net
Thu Sep 17 13:45:20 UTC 2020
On Wed, 9 Sep 2020 12:35:06 GMT, Galder Zamarreño <github.com+50187+galderz at openjdk.org> wrote:
> * Release fence guarantees that cacheArray field will published with a non-null value.
> * Without this fix, CacheValueMap.cacheArray can sometimes be seen as null.
>
> This is a follow up to @PaulSandoz's feedback
> [here](https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-August/068248.html) for the first attempt to fix
> [JDK-8251397](https://bugs.openjdk.java.net/browse/JDK-8251397). In this update, the fence has been moved to
> `initializeMap()` and added Paul's suggested comment.
> Annotating `classValueMap` with `@Stable` is outside the scope of this issue.
This pull request has now been integrated.
Changeset: 81e2cf82
Author: Galder Zamarreño <galder at redhat.com>
Committer: Severin Gehwolf <sgehwolf at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/81e2cf82
Stats: 14 lines in 1 file changed: 0 ins; 12 del; 2 mod
8251397: NPE on ClassValue.ClassValueMap.cacheArray
Add release fence to ClassValueMap constructor.
* Release fence guarantees that cacheArray field will published
with a non-null value.
* Without this fix, CacheValueMap.cacheArray can sometimes be
seen as null.
Reviewed-by: shade, psandoz
-------------
PR: https://git.openjdk.java.net/jdk/pull/94
More information about the core-libs-dev
mailing list