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

Tobias Hartmann thartmann at openjdk.org
Wed Sep 11 14:22:35 UTC 2024


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

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

Commit messages:
 - 8338566: Missing membar in ciEnv::get_or_create_exception before publishing handle

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

PR: https://git.openjdk.org/jdk/pull/20950


More information about the hotspot-compiler-dev mailing list