RFR: 8259021 avoid double racy reads from non-volatile fields of SharedSecrets

Aleksey Shipilev shade at openjdk.java.net
Mon Jan 4 09:55:56 UTC 2021


On Thu, 31 Dec 2020 10:02:01 GMT, Peter Levart <plevart at openjdk.org> wrote:

> See: https://bugs.openjdk.java.net/browse/JDK-8259021
> See also discussion in thread: https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-December/072798.html

Looks good, but can we not do the behavioral change in `ensureClassInitialized`? There are methods like this in JDK, which could probably be changed wholesale?

src/java.base/share/classes/jdk/internal/access/SharedSecrets.java line 419:

> 417:         } catch (IllegalAccessException e) {
> 418:             throw new InternalError(e);
> 419:         }

This is a potential behavioral change that has little to do with the issue at hand, right?

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

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



More information about the security-dev mailing list