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

CDS dumping code calls TRAPS functions in VM thread

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 17
    • 17
    • hotspot
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: