Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8321130

Microbenchmarks do not build any more after 8254693 on 32 bit platforms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 22
    • core-libs
    • 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;

            jvernee Jorn Vernee
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: