-
Bug
-
Resolution: Fixed
-
P4
-
None
-
19
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Attempting to copy from a MemorySegment backed by a StringCharBuffer results in the JVM crashing, as both the buffer's 'address' field is 0 and the 'base' object (the 'hb' array) is null
---------- BEGIN SOURCE ----------
import java.lang.foreign.MemorySegment;
import java.nio.CharBuffer;
public class Main {
public static void main(String[] args) {
MemorySegment src = MemorySegment.ofBuffer(CharBuffer.wrap("Hello"));
MemorySegment dst = MemorySegment.ofArray(new char[5]);
dst.copyFrom(src);
}
}
---------- END SOURCE ----------
FREQUENCY : always
Attempting to copy from a MemorySegment backed by a StringCharBuffer results in the JVM crashing, as both the buffer's 'address' field is 0 and the 'base' object (the 'hb' array) is null
---------- BEGIN SOURCE ----------
import java.lang.foreign.MemorySegment;
import java.nio.CharBuffer;
public class Main {
public static void main(String[] args) {
MemorySegment src = MemorySegment.ofBuffer(CharBuffer.wrap("Hello"));
MemorySegment dst = MemorySegment.ofArray(new char[5]);
dst.copyFrom(src);
}
}
---------- END SOURCE ----------
FREQUENCY : always