Java 17 bug (?) on Windows with MemorySegment.asSlice and offset =
erel at eth.gl
erel at eth.gl
Thu May 12 08:45:40 UTC 2022
(sorry for the frequent messages)
In the previous example the exception was thrown from the “force” call. A low level error happens with similar code:
long offset = 3704800000L;
ByteBuffer bb = ByteBuffer.allocateDirect(100000);
MemorySegment mbb = MemorySegment.ofByteBuffer(bb);
while (true) {
System.out.println("offset: " + offset);
MemorySegment target = mappedMemorySegment.asSlice(offset, 100000);
offset = offset + 100000;
target.copyFrom(mbb);
}
Output:
WARNING: Using incubator modules: jdk.incubator.foreign
64
amd64
17.0.3.1
byteSize: 8000000000
offset: 3704800000
offset: 3704900000
offset: 3705000000
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000027a6c4f4176, pid=16060, tid=2208
#
# JRE version: Java(TM) SE Runtime Environment (17.0.3.1+2) (build 17.0.3.1+2-LTS-6)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.3.1+2-LTS-6, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# v ~StubRoutines::jlong_disjoint_arraycopy
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# …\hs_err_pid16060.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
More information about the panama-dev
mailing list