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

Broken assertion in ClassLoaderData::remove_handle

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b07

      Description

      My last change for dependencies made the assertion in remove_handle that the handle is present, into an assertion that the oop is present, which is not the reason for the assertion. We want to assert that the OopHandle is in the handle block.

      From [~stefank] code review comment:

      > http://cr.openjdk.java.net/~coleenp/8198926.01/webrev/src/hotspot/share/classfile/classLoaderData.cpp.udiff.html
      > void ClassLoaderData::remove_handle(OopHandle h) {
      > assert(!is_unloading(), "Do not remove a handle for a CLD that is unloading");
      > oop* ptr = h.ptr_raw();
      > if (ptr != NULL) {
      > - assert(_handles.contains(ptr), "Got unexpected handle " PTR_FORMAT, p2i(ptr));
      > + assert(_handles.contains(*ptr), "Got unexpected handle " PTR_FORMAT, p2i(ptr));
      >
      > With this change have now started too look for the oop and not the oop*. That seems incorrect to me. I think the purpose of this test to check that the OopHandle actually belongs to this _handles container, and not some other CLD's _handles.

      Hm, yes, you're right. We need two different contains() functions. I'll file a bug to add this back.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: