-
Bug
-
Resolution: Fixed
-
P3
-
None
-
repo-valhalla
Flat fields cannot, in general support atomic access modes such as `compareAndExchage`. The same goes for array element var handles, as performing an atomic access operation on an element of a flattened array cannot, in general, be supported.
The current implementation supports these operations using locking. Not only this is inefficient, but atomicity guarantees can only be provided as long as all actors access the storage through the var handle (and its associated lock). That is, if thread A performs an atomic access using a var handle, but thread B just performs a plain access on the same variable, atomicity is lost.
Conservatively, we should:
* make sure that var handles pointing to flat fields only support plain modes
* non-plain access modes on array element var handles reject flat array parameters
The current implementation supports these operations using locking. Not only this is inefficient, but atomicity guarantees can only be provided as long as all actors access the storage through the var handle (and its associated lock). That is, if thread A performs an atomic access using a var handle, but thread B just performs a plain access on the same variable, atomicity is lost.
Conservatively, we should:
* make sure that var handles pointing to flat fields only support plain modes
* non-plain access modes on array element var handles reject flat array parameters
- causes
-
JDK-8353182 [lworld] C2: Multiple IR test failures in compiler/gcbarriers/TestZGCBarrierElision.java after JDK-8351569
-
- Open
-
-
JDK-8353180 [lworld] C2: fatal error: Not monotonic
-
- In Progress
-
- relates to
-
JDK-8351211 [lworld] Atomic layout access support in Unsafe
-
- Open
-
-
JDK-8352737 Fix TestIntrinsics after VarHandle support cleanup
-
- Open
-
- links to
-
Commit(lworld) openjdk/valhalla/0f7cdf3b
-
Review(lworld) openjdk/valhalla/1402
(1 links to)