-
Bug
-
Resolution: Fixed
-
P3
-
8
-
b10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8365642 | 25.0.2 | David Holmes | P3 | Resolved | Fixed | master |
JDK-8365070 | 21.0.10-oracle | David Holmes | P3 | Resolved | Fixed | master |
The fix for JDK-8361447 added a new field to the GuardHeader, not realizing that the size of the GuardHeader must be such that the address of the user-data has the strictest necessary alignment (16-byte).
We need to restore the alignment. Releases able to use C++11 can use `alignas(16)` to achieve this. Earlier releases can add a dummy 8-byte field for padding.
This is not generally a problem as since JDK 19 (JDK-8277822) the only use of `GuardedMemory` is for -Xcheck:jni, but Java arrays only have 8-byte alignment to begin with so are unaffected in normal use.
Prior to JDK 19 VM code only used GuardedMemory in debug builds, and no such usage had such a strict alignment requirement since some ZGC code in JDK 17 (it used movaps to process data).
We need to restore the alignment. Releases able to use C++11 can use `alignas(16)` to achieve this. Earlier releases can add a dummy 8-byte field for padding.
This is not generally a problem as since JDK 19 (
Prior to JDK 19 VM code only used GuardedMemory in debug builds, and no such usage had such a strict alignment requirement since some ZGC code in JDK 17 (it used movaps to process data).
- backported by
-
JDK-8365070 Fix for JDK-8361447 breaks the alignment requirements for GuardedMemory
-
- Resolved
-
-
JDK-8365642 Fix for JDK-8361447 breaks the alignment requirements for GuardedMemory
-
- Resolved
-
- caused by
-
JDK-8361447 [REDO] Checked version of JNI Release<type>ArrayElements needs to filter out known wrapped arrays
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk25u/a7cdb534
-
Commit(master) openjdk/jdk/078d0d49
-
Review(master) openjdk/jdk25u/75
-
Review(master) openjdk/jdk/26524
(2 links to)