-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
None
-
Affects Version/s: 16, repo-panama
-
Component/s: tools
This test fails with a JVM crash:
import jdk.incubator.foreign.MemoryAccess;
import jdk.incubator.foreign.MemorySegment;
import jdk.incubator.foreign.ResourceScope;
class SIGSEGV {
public static void main(String[] args) {
MemorySegment memorySegment = MemorySegment.allocateNative(2147479552, ResourceScope.globalScope());
MemoryAccess.getLongAtOffset(memorySegment, 8223372036854705800L);
}
}
However, when executed with "-Djdk.incubator.foreign.SmallSegments=false", same tests fails with IndexOutOfBoundsException, as expected.
import jdk.incubator.foreign.MemoryAccess;
import jdk.incubator.foreign.MemorySegment;
import jdk.incubator.foreign.ResourceScope;
class SIGSEGV {
public static void main(String[] args) {
MemorySegment memorySegment = MemorySegment.allocateNative(2147479552, ResourceScope.globalScope());
MemoryAccess.getLongAtOffset(memorySegment, 8223372036854705800L);
}
}
However, when executed with "-Djdk.incubator.foreign.SmallSegments=false", same tests fails with IndexOutOfBoundsException, as expected.
- relates to
-
JDK-8272372 Performance regression in memory access API
-
- Closed
-