RFR: 8338566: Missing membar in ciEnv::get_or_create_exception before publishing handle [v2]

Aleksey Shipilev shade at openjdk.org
Fri Sep 13 11:43:05 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

Cleaner, right? No concurrency problems, exceptions get CDS archived. This might affect startup a little, but I would not expect it to matter. 

I suggest to rename the bug into something else, given the whole `ciEnv::get_or_create_exception` is gone.

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

Marked as reviewed by shade (Reviewer).

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


More information about the hotspot-compiler-dev mailing list