Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6628

Deadlock in getProxyClass()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 5.0M14
    • None
    • JDK
    • None
    • harmony-5.0-jdk-946978/
      harmony-6.0-jdk-946981/
      Linux-32
      Eclipse 3.5

    Description

      In certain situations the method java.lang.reflect.Proxy.getProxyClass() produces a deadlock. This seems always to be the case when getProxyClass() is called recursively by defineClassImpl().

      public static Class<?> getProxyClass(
      ClassLoader loader,
      Class<?>[] interfaces
      ) throws IllegalArgumentException {
      ...
      synchronized (loaderCache)

      { ... newClass = defineClassImpl(loader, ...); ... }

      }

      When the native method recursively invokes getClassImpl() (via newProxyInstance()) the VM is locked at synchronized (loaderCache). Because I only have one thread (Main) a deadlock must never occur.

      Attachments

        1. TestProxy.java
          4 kB
          Werner Froidevaux

        Activity

          People

            Unassigned Unassigned
            wfro Werner Froidevaux
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: