RFR: 8338566: Lazy creation of exception instances is not thread safe [v2]

Dean Long dlong at openjdk.org
Mon Sep 16 22:28:08 UTC 2024


On Fri, 13 Sep 2024 09:14:21 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Similar to [JDK-8251923](https://bugs.openjdk.org/browse/JDK-8251923), we need a store-store barrier before publishing a handle because otherwise another thread could observe the handle before it's fully initialized and read null from it. This affects architectures with a weak memory model like AArch64.
>> 
>> Unfortunately, this only happened twice in our testing and I was never able to reproduce it.
>> 
>> Thanks,
>> Tobias
>
> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Create exceptions eagerly

Nice improvement.

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

Marked as reviewed by dlong (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20950#pullrequestreview-2307940715


More information about the hotspot-compiler-dev mailing list