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

JVMTI jtreg tests build warnings on 32-bit platforms

    Details

    • Subcomponent:
    • Resolved In Build:
      b19
    • CPU:
      arm
    • OS:
      linux

      Backports

        Description

        RFR 8199383 introduced a number of disturbing warnings for ARM32 build:

        In file included from /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/librefignore.c:33:0:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c: In function ‘setTag’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:135:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
           class_tag = (MyTag*)haba;
                       ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:147:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
           err = (*jvmti)->SetTag(jvmti, obj, (jlong)new_tag);
                                              ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c: In function ‘heapMarkCallback’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:296:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
           const MyTag* const tag = newTag(rmark, (const MyTag*)class_tag, size, NULL);
                                                  ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:297:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
           *tag_ptr = (jlong)tag;
                      ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c: In function ‘heapRootCallback’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:315:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             MyTag* tag = newTag(kind, (MyTag*)class_tag, size, NULL);
                                       ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:317:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             *tag_ptr = (jlong)tag;
                        ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:320:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             addRef(fakeRoot, HEAP_ROOT_REF_KIND_BASE+root_kind, (MyTag*)*tag_ptr);
                                                                 ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c: In function ‘stackReferenceCallback’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:341:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             MyTag* tag = newTag(kind, (MyTag*)class_tag, size, NULL);
                                       ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:343:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             *tag_ptr = (jlong)tag;
                        ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:346:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             addRef(fakeRoot, HEAP_ROOT_REF_KIND_BASE+root_kind, (MyTag*)*tag_ptr);
                                                                 ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c: In function ‘objectReferenceCallback’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:367:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             referrer = (MyTag *)referrer_tag;
                        ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:372:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             MyTag* tag = newTag(kind, (MyTag*)class_tag, size, NULL);
                                       ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:374:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             *tag_ptr = (jlong) tag;
                        ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.c:377:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             MyTag* tag = (MyTag*)*tag_ptr;
                          ^
        In file included from /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/libheapref.c:33:0:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c: In function ‘setTag’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:135:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
           class_tag = (MyTag*)haba;
                       ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:147:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
           err = (*jvmti)->SetTag(jvmti, obj, (jlong)new_tag);
                                              ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c: In function ‘heapMarkCallback’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:298:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
           const MyTag* const tag = newTag(rmark, (const MyTag*)class_tag, size, NULL);
                                                  ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:299:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
           *tag_ptr = (jlong)tag;
                      ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c: In function ‘heapRootCallback’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:317:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             MyTag* tag = newTag(kind, (MyTag*)class_tag, size, NULL);
                                       ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:319:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             *tag_ptr = (jlong)tag;
                        ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:322:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             addRef(fakeRoot, HEAP_ROOT_REF_KIND_BASE+root_kind, (MyTag*)*tag_ptr);
                                                                 ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c: In function ‘stackReferenceCallback’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:343:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             MyTag* tag = newTag(kind, (MyTag*)class_tag, size, NULL);
                                       ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:345:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             *tag_ptr = (jlong)tag;
                        ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:348:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             addRef(fakeRoot, HEAP_ROOT_REF_KIND_BASE+root_kind, (MyTag*)*tag_ptr);
                                                                 ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c: In function ‘objectReferenceCallback’:
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:369:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             referrer = (MyTag *)referrer_tag;
                        ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:374:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             MyTag* tag = newTag(kind, (MyTag*)class_tag, size, NULL);
                                       ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:376:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             *tag_ptr = (jlong) tag;
                        ^
        /home/build/jdk-jdk/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/heapref/heapref.c:379:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             MyTag* tag = (MyTag*)*tag_ptr;
                          ^

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bulasevich Boris Ulasevich
                  Reporter:
                  bulasevich Boris Ulasevich
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: