RFR: 8317600: VtableStubs::stub_containing() table load not ordered wrt to stores

Thomas Schatzl tschatzl at openjdk.org
Thu Oct 5 15:04:34 UTC 2023


Hi all,

  please review this change that makes sure that `Vtablestubs::stub_containing()` (and `::vtable_stub_do()` I noticed while implementing this) use proper memory fences to correctly observe the next pointers in the hash table buckets.

I assume that this memory ordering issue never occurs in the wild, there is probably always some additional memory fencing between the addition of the element to the given bucket to the iteration. However it is still the more correct code (I believe) to explicitly enforce memory ordering.

Testing: gha, class unloading stress test

Thanks,
  Thomas

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

Commit messages:
 - 8317600 vtablestubs::stub_containing memory ordering not guaranteed

Changes: https://git.openjdk.org/jdk/pull/16056/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16056&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8317600
  Stats: 27 lines in 2 files changed: 5 ins; 9 del; 13 mod
  Patch: https://git.openjdk.org/jdk/pull/16056.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16056/head:pull/16056

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


More information about the hotspot-compiler-dev mailing list