-
Bug
-
Resolution: Fixed
-
P4
-
16
-
b18
These two:
$ CONF=linux-x86-server-fastdebug make images run-test TEST=java/foreign/TestByteBuffer.java
java.lang.OutOfMemoryError: Unable to allocate 2147483660 bytes
at java.base/jdk.internal.misc.Unsafe.allocateMemory(Unsafe.java:632)
at jdk.incubator.foreign/jdk.internal.foreign.NativeMemorySegmentImpl.makeNativeSegment(NativeMemorySegmentImpl.java:91)
at jdk.incubator.foreign/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:612)
at jdk.incubator.foreign/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:559)
at TestByteBuffer.testTooBigForByteBuffer(TestByteBuffer.java:464)
$ CONF=linux-x86-server-fastdebug make images run-test TEST=java/foreign/TestMismatch.java
test TestMismatch.testLarge(): failure
java.lang.OutOfMemoryError: Unable to allocate 2147483660 bytes
at java.base/jdk.internal.misc.Unsafe.allocateMemory(Unsafe.java:632)
at jdk.incubator.foreign/jdk.internal.foreign.NativeMemorySegmentImpl.makeNativeSegment(NativeMemorySegmentImpl.java:91)
at jdk.incubator.foreign/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:612)
at jdk.incubator.foreign/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:559)
at TestMismatch.testLarge(TestMismatch.java:114)
They were failing before, and fixed byJDK-8237521 and using "(long) Integer.MAX_VALUE * 2" that would expose this path to additional checking on Unsafe side, which will throw the exception the test expects.
However, that was reverted during theJDK-8243491 integration back to "(long)Integer.MAX_VALUE + 10L)":
https://hg.openjdk.java.net/jdk/jdk/diff/8113059a83b2/test/jdk/java/foreign/TestByteBuffer.java#l1.118
But I find the whole thing rather fragile.
$ CONF=linux-x86-server-fastdebug make images run-test TEST=java/foreign/TestByteBuffer.java
java.lang.OutOfMemoryError: Unable to allocate 2147483660 bytes
at java.base/jdk.internal.misc.Unsafe.allocateMemory(Unsafe.java:632)
at jdk.incubator.foreign/jdk.internal.foreign.NativeMemorySegmentImpl.makeNativeSegment(NativeMemorySegmentImpl.java:91)
at jdk.incubator.foreign/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:612)
at jdk.incubator.foreign/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:559)
at TestByteBuffer.testTooBigForByteBuffer(TestByteBuffer.java:464)
$ CONF=linux-x86-server-fastdebug make images run-test TEST=java/foreign/TestMismatch.java
test TestMismatch.testLarge(): failure
java.lang.OutOfMemoryError: Unable to allocate 2147483660 bytes
at java.base/jdk.internal.misc.Unsafe.allocateMemory(Unsafe.java:632)
at jdk.incubator.foreign/jdk.internal.foreign.NativeMemorySegmentImpl.makeNativeSegment(NativeMemorySegmentImpl.java:91)
at jdk.incubator.foreign/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:612)
at jdk.incubator.foreign/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:559)
at TestMismatch.testLarge(TestMismatch.java:114)
They were failing before, and fixed by
However, that was reverted during the
https://hg.openjdk.java.net/jdk/jdk/diff/8113059a83b2/test/jdk/java/foreign/TestByteBuffer.java#l1.118
But I find the whole thing rather fragile.
- relates to
-
JDK-8237521 Memory Access API fixes for 32-bit
- Resolved
-
JDK-8255270 java/foreign/TestMismatch.java still fails on 32-bit platforms
- Closed
-
JDK-8243491 Implementation of Foreign-Memory Access API (Second Incubator)
- Resolved