JDK-8170643 : Remove mixed-size accesses to the LockWord
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2016-12-02
  • Updated: 2019-08-15
  • Resolved: 2019-01-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Description
The Lockword in the Mutex/Monitor  encodes various bits of information and is usually updated via a full-word atomic CAS. However, an optimization in the unlock path was implemented years ago for sparc/x86 using a non-atomic byte-store of zero into the LSB to clear the lock. It is not clear if architectures other than sparc/x86 guarantee the safety of such mixed accesses and it is suggested to simply replace the store of zero with an atomic decrement.
Comments
Despite what I originally wrote in the description, this is not about the "lockword" in the "object header", it is about the _LockWord in the Monitor/Mutex implementation. That implementation is being replaced under JDK-8210832, so closing this as a duplicate.
21-01-2019

Low priority - deferred to 11.
06-04-2017