harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Werner Froidevaux (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6628) Deadlock in getProxyClass()
Date Thu, 19 Aug 2010 14:40:19 GMT
Deadlock in getProxyClass()
---------------------------

                 Key: HARMONY-6628
                 URL: https://issues.apache.org/jira/browse/HARMONY-6628
             Project: Harmony
          Issue Type: Bug
          Components: JDK
    Affects Versions: 5.0M14
         Environment: harmony-5.0-jdk-946978/
harmony-6.0-jdk-946981/
Linux-32
Eclipse 3.5
            Reporter: Werner Froidevaux
            Priority: Blocker


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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message