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

vmTestbase/nsk/jvmti/ test should be fixed to fail early if JVMTI function return error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 16
    • 15
    • hotspot
    • b06

      The following example cause crash instead of failures
      err = jvmti->GetFrameLocation(thr, 0, &mid, &loc);
          if (err != JVMTI_ERROR_NONE) {
              printf("(GetFrameLocation) unexpected error: %s (%d)\n",
                     TranslateError(err), err);
              result = STATUS_FAILED;
          }

      The "mid" and "loc" shouldn't be used if GetFrameLocation failed.
      Immediate return from the function is needed if it failed with non-JVMTI_ERROR_NONE.

            lmesnik Leonid Mesnik
            lmesnik Leonid Mesnik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: