JDK-8255350 : MemoryLayout and 32-bit VMs: should long[]/double[] be 4-byte aligned?
  • Type: Enhancement
  • Component: core-libs
  • Priority: P3
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2020-10-23
  • Updated: 2020-10-23
Related Reports
Relates :  
Description
See JDK-8255343 change. The test fails on x86_32, because the alignment by 8 is unexpected. It is an open question whether the alignment should indeed be 4 or 8 for those types.

For one, this makes the implementation assumption that nothing accesses long[]/double[] elements atomically. This might have been okay in the past, but today we can probably do the atomic access with VarHandle, and it is supposed to work somehow.

If we change JAVA_LONG and JAVA_DOUBLE alignment to 4 for x86_32, then JDK-8255343 can be reverted.