RFR: 8293197: Avoid double racy reads from non-volatile fields in SharedSecrets

Bernd Eckenfels ecki at zusammenkunft.net
Thu Sep 1 09:54:46 UTC 2022


BTW, after then ensures it looks like a good candidate for a system-assert for not-null for all of those fields, right?

Gruss
Bernd
--
http://bernd.eckenfels.net
________________________________
Von: core-libs-dev <core-libs-dev-retn at openjdk.org> im Auftrag von Andrey Turbanov <aturbanov at openjdk.org>
Gesendet: Thursday, September 1, 2022 8:24:58 AM
An: core-libs-dev at openjdk.org <core-libs-dev at openjdk.org>; security-dev at openjdk.org <security-dev at openjdk.org>
Betreff: RFR: 8293197: Avoid double racy reads from non-volatile fields in SharedSecrets

After integration of [JDK-8259021](https://bugs.openjdk.org/browse/JDK-8259021) a few more fields were added to `SharedSecrets` class. It make sense to update their reading code to use the same idiom.

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

Commit messages:
 - [PATCH] SharedSecrets should avoid double racy reads from non-volatile fields
 - [PATCH] SharedSecrets should avoid double racy reads from non-volatile fields

Changes: https://git.openjdk.org/jdk/pull/10076/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10076&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8293197
  Stats: 16 lines in 1 file changed: 8 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/10076.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10076/head:pull/10076

PR: https://git.openjdk.org/jdk/pull/10076
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20220901/5f8d016f/attachment.htm>


More information about the security-dev mailing list