-
Bug
-
Resolution: Fixed
-
P2
-
20
-
None
-
b31
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8300008 | 21 | Maurizio Cimadamore | P2 | Resolved | Fixed | b05 |
JDK-8300371 | 20.0.1 | Maurizio Cimadamore | P2 | Resolved | Fixed | b02 |
The following test currently fails:
@Test(expectedExceptions = IllegalArgumentException.class,
expectedExceptionsMessageRegExp = ".*Heap segment not allowed.*")
public void testNoHeapSets() {
MemorySegment targetSegment = MemorySegment.allocateNative(ADDRESS.byteSize(), SegmentScope.auto());
MemorySegment segment = MemorySegment.ofArray(new byte[]{ 0, 1, 2 });
targetSegment.set(ADDRESS, 0, segment); // should throw
}
i.e. it is possible to set a heap segment's address into another memory segment. The address of a heap segment is a virtual address, so doing this is non-sensicle.
This should be blocked.
@Test(expectedExceptions = IllegalArgumentException.class,
expectedExceptionsMessageRegExp = ".*Heap segment not allowed.*")
public void testNoHeapSets() {
MemorySegment targetSegment = MemorySegment.allocateNative(ADDRESS.byteSize(), SegmentScope.auto());
MemorySegment segment = MemorySegment.ofArray(new byte[]{ 0, 1, 2 });
targetSegment.set(ADDRESS, 0, segment); // should throw
}
i.e. it is possible to set a heap segment's address into another memory segment. The address of a heap segment is a virtual address, so doing this is non-sensicle.
This should be blocked.
- backported by
-
JDK-8300008 OfAddress setter should disallow heap segments
-
- Resolved
-
-
JDK-8300371 OfAddress setter should disallow heap segments
-
- Resolved
-
- csr for
-
JDK-8299889 OfAddress setter should disallow heap segments
-
- Closed
-