RFR: 8299684: (bf) JNI direct buffer functions with large capacity behave unexpectedly [v14]
David Holmes
dholmes at openjdk.org
Tue Jan 24 06:54:14 UTC 2023
On Wed, 18 Jan 2023 16:54:45 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> test/jdk/java/nio/jni/libNewDirectByteBuffer.c line 49:
>>
>>> 47: (JNIEnv *env, jclass cls, jobject buf)
>>> 48: {
>>> 49: return (jlong)(*env)->GetDirectBufferAddress(env, buf);
>>
>> The cast to jlong should be okay for 64-bit. For 32-bit then it will likely need a double cast, as in ((jlong)(int)( .. )) but maybe okay for now as you've restricted the test to 64-bit.
>
> Leaving it as-is for now.
FTR this was the wrong choice as the test is still built on 32-bit (and fails to compile).
-------------
PR: https://git.openjdk.org/jdk/pull/11873
More information about the nio-dev
mailing list