RFR: 8338566: Missing membar in ciEnv::get_or_create_exception before publishing handle

Tobias Hartmann thartmann at openjdk.org
Fri Sep 13 09:14:21 UTC 2024


On Wed, 11 Sep 2024 14:17:30 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

Okay, here's a new version with eager exception creation. Looks much cleaner to me.

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

PR Comment: https://git.openjdk.org/jdk/pull/20950#issuecomment-2348443203


More information about the hotspot-compiler-dev mailing list