On Mon, 17 Jun 2024 14:51:07 GMT, Weijun Wang <wei...@openjdk.org> wrote:
> Make sure `pd` is always the same object when `getProtectionDomain0` is null. test/jdk/java/lang/Class/ProtectionDomainRace.java line 42: > 40: try { > 41: Subject.doAs(null, ac); > 42: } catch (Throwable t) { This can test for the racy NPE, but it cannot detect if there's distinct allPermDomain objects written by races. Should we add another check to defend against that? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19752#discussion_r1642969479