RFR: JDK-8251397 NPE on ClassValue.ClassValueMap.cacheArray
galder at redhat.com
Wed Aug 19 11:53:23 UTC 2020
I've created patch  to fix the ClassValue$ClassValueMap NPE bug in .
The bug has been discussed by other members in the list in thread .
The patch follows the simple fix suggested by Doug and others in that
exchange, e.g. . That is, it adds a release fence
to ClassValue$ClassValueMap constructor to avoid the NPE.
To verify the fix, I ran the jcstress test that Paul posted in  and
played around with the difference fixes suggested in the thread. Adding the
release fence did indeed fix the jcstress test.
To further verify the issue, I've successfully run both the tier1 tests and
the Quarkus native testsuite with a Mandrel 20.1 built with JDK 11.0.8
version patched with the fix (higher JDKs not supported yet). Note that
this NPE happens on rare occasions.
The patch applies cleanly to JDK 11.
 Bug: https://bugs.openjdk.java.net/browse/JDK-8251397
More information about the core-libs-dev