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

nsk/jvmti/IterateThroughHeap/filter-* are broken

    Details

    • Subcomponent:
    • Resolved In Build:
      b03

      Backports

        Description

        nsk/jvmti/IterateThroughHeap/filter-* tests use HeapFilter native agent. verify_tag function in HeapFilter.c has the following switch statement:
        {code}
          switch(filter_type) {
          JVMTI_HEAP_FILTER_TAGGED:
            return object_tag == 0;
          JVMTI_HEAP_FILTER_UNTAGGED:
            return object_tag != 0;
          JVMTI_HEAP_FILTER_CLASS_TAGGED:
            return class_tag == 0;
          JVMTI_HEAP_FILTER_CLASS_UNTAGGED:
            return class_tag != 0;
          default:
            return JNI_FALSE;
        {code}

        since there is no 'case' k/w before any of 'JMVTI_.*', all of them are treated as goto label and not as case values. therefore the switch is equivalent to 'return JNI_FALSE'. w/ the switch fixed by adding 'case' k/w, all these tests fail.

        native compilers (at least msvc) report unused goto labels as warnings, so this switch has to be fixed, otherwise we aren't able to convert jvmti tests to jtreg.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  amenkov Alex Menkov
                  Reporter:
                  iignatyev Igor Ignatyev
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: