-
Enhancement
-
Resolution: Won't Fix
-
P3
-
None
-
19
Observed that SegmentAllocator:allocateArray(*) methods throws undocumented IllegalArgumentException where the layout alignment is more than their bitsize.
The possible scenario of these methods throwing IAEx is not documented.
For the below case :
SegmentAllocator.implicitAllocator().allocateArray(ValueLayout.JAVA_BYTE.withBitAlignment(16),new byte[]{1,2,
3});
will result in - java.lang.IllegalArgumentException: Source layout alignment greater than its size
The spec can be enhanced for this case.
The possible scenario of these methods throwing IAEx is not documented.
For the below case :
SegmentAllocator.implicitAllocator().allocateArray(ValueLayout.JAVA_BYTE.withBitAlignment(16),new byte[]{1,2,
3});
will result in - java.lang.IllegalArgumentException: Source layout alignment greater than its size
The spec can be enhanced for this case.
- relates to
-
JDK-8282192 Implementation of Foreign Function & Memory API (Preview)
-
- Closed
-