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

CDS dumping code calls TRAPS functions in VM thread

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b17

      Description

      void DynamicArchiveBuilder::sort_methods(InstanceKlass* ik) const {
        ...
        Thread* THREAD = Thread::current();
        ...
        ik->vtable().initialize_vtable(true, THREAD); assert(!HAS_PENDING_EXCEPTION, "cannot fail");
        ik->itable().initialize_itable(true, THREAD); assert(!HAS_PENDING_EXCEPTION, "cannot fail");
      }

      The code works today because the two calls should never throw exceptions (there are no allocations, no loader constraint check, etc).

      However, if we change TRAPS to be JavaThread*, we will not be able to do this anymore. (See JDK-8252685).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              coleenp Coleen Phillimore
              Reporter:
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: