JDK-8321130 : Microbenchmarks do not build any more after 8254693 on 32 bit platforms
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.foreign
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-11-30
  • Updated: 2023-12-01
  • Resolved: 2023-12-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 masterFixed
Related Reports
Relates :  
Description
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;


Comments
Changeset: 3b30095a Author: Jorn Vernee <jvernee@openjdk.org> Date: 2023-12-01 13:11:07 +0000 URL: https://git.openjdk.org/jdk/commit/3b30095a63bdf8224a5625507a69942210a203a0
01-12-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16913 Date: 2023-11-30 20:59:01 +0000
30-11-2023