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

CDS dumping code calls TRAPS functions in VM thread

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 17
    • hotspot
    • b17

      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).

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

              Created:
              Updated:
              Resolved: