-
Bug
-
Resolution: Fixed
-
P4
-
22
-
None
The following code:
JNIEXPORT void JNICALL Java_org_openjdk_bench_java_lang_foreign_xor_GetArrayUnsafeXorOpImpl_xorOp
(JNIEnv *env, jobject obj, jlong src, jlong dst, jint len) {
jbyte *sbuf = (jbyte*)(void*)src;
jbyte *dbuf = (jbyte*)(void*)dst;
xor_op(sbuf, dbuf, len);
}
from jdk/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c does not build on 32 bit platforms because of the pointer cast.
test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c: In function 'Java_org_openjdk_bench_java_lang_foreign_xor_GetArrayUnsafeXorOpImpl_xorOp':
jdk/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c:72:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
72 | jbyte *sbuf = (jbyte*)(void*)src;
| ^
jdk/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c:73:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
73 | jbyte *dbuf = (jbyte*)(void*)dst;
JNIEXPORT void JNICALL Java_org_openjdk_bench_java_lang_foreign_xor_GetArrayUnsafeXorOpImpl_xorOp
(JNIEnv *env, jobject obj, jlong src, jlong dst, jint len) {
jbyte *sbuf = (jbyte*)(void*)src;
jbyte *dbuf = (jbyte*)(void*)dst;
xor_op(sbuf, dbuf, len);
}
from jdk/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c does not build on 32 bit platforms because of the pointer cast.
test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c: In function 'Java_org_openjdk_bench_java_lang_foreign_xor_GetArrayUnsafeXorOpImpl_xorOp':
jdk/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c:72:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
72 | jbyte *sbuf = (jbyte*)(void*)src;
| ^
jdk/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c:73:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
73 | jbyte *dbuf = (jbyte*)(void*)dst;
- relates to
-
JDK-8254693 Add Panama feature to pass heap segments to native code
- Resolved