Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8279815 | 19 | Maurizio Cimadamore | P3 | Resolved | Fixed | b05 |
JDK-8279770 | 18.0.1 | Maurizio Cimadamore | P3 | Resolved | Fixed | b02 |
When accessing an off-heap memory segment, we can always ensure that access conforms to some alignment constraint, as there is always some physical address value (e.g. a long) to look at.
For heap segments, no machine address exists (as heap addresses are virtualized). The implementation of the Foreign Memory Access falls back to check the _offset_ in the segment at which the access occurs - but doing so can lead to behavior that is ultimately platform-dependent: the offset of the first element in a heap segment depends on how big the header-size of an array object is. More specifically, while on 64-bit platforms, all arrays will have their first element aligned at 64-bit - the same is not true for 32-bit platforms. Because of this, copying aligned long values on a memory segment backed by a byte[] might fail depending on the platform.
For a more detailed description of this issue, please refer to:
https://mail.openjdk.java.net/pipermail/panama-dev/2021-November/015852.html
For heap segments, no machine address exists (as heap addresses are virtualized). The implementation of the Foreign Memory Access falls back to check the _offset_ in the segment at which the access occurs - but doing so can lead to behavior that is ultimately platform-dependent: the offset of the first element in a heap segment depends on how big the header-size of an array object is. More specifically, while on 64-bit platforms, all arrays will have their first element aligned at 64-bit - the same is not true for 32-bit platforms. Because of this, copying aligned long values on a memory segment backed by a byte[] might fail depending on the platform.
For a more detailed description of this issue, please refer to:
https://mail.openjdk.java.net/pipermail/panama-dev/2021-November/015852.html
- backported by
-
JDK-8279770 Alignment of heap segments is not enforced correctly
- Resolved
-
JDK-8279815 Alignment of heap segments is not enforced correctly
- Resolved
- csr for
-
JDK-8278898 Alignment of heap segments is not enforced correctly
- Closed