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

nsk_jvmti_aod_disableEvent{s}AndFinish should pass address of success

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 16
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None

      Description

      The change below is not needed as the call to nsk_jvmti_aod_disableEventAndFinish() does exactly the same:

      - nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_OBJECT_FREE, success, jvmti, jni);
      +
      + /* Flush any pending ObjectFree events, which may set success to 1 */
      + if (jvmti->SetEventNotificationMode(JVMTI_DISABLE,
      + JVMTI_EVENT_OBJECT_FREE,
      + NULL) != JVMTI_ERROR_NONE) {
      + success = 0;
      + }
      +
      + nsk_aod_agentFinished(jni, agentName, success);
       }

      Posting the event in nsk_jvmti_aod_disableEventAndFinish rather than in the caller beforehand, sets the global 'success' variable and not this local variable so the test would fail. We should fix these functions so that this code isn't duplicated in one of the tests. Found when reviewing JDK-8212879.

      Then we can undo this part of this patch.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: