classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] RFC: Class Loader patch to record class with initiating cla


From: Jeroen Frijters
Subject: [cp-patches] RFC: Class Loader patch to record class with initiating class loader
Date: Wed, 27 Jul 2005 13:18:44 +0200

Hi,

While digging around the class loading issues, I discovered that we
didn't record a class with the "initiating loader" [1]. This is
necessary to maintain type safety in the face of buggy or malicious
class loaders (or even when the contents of the directories in the
classpath change).

I've also attached a Mauve test case that checks for everything I could
think of. These tests pass on IBM JDK 1.3, Sun JDK 1.4, Sun JDK 1.5 and
my local IKVM version.

Please comment.

Regards,
Jeroen

[1]
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassLoader.html#findL
oadedClass(java.lang.String)

2005-07-27  Jeroen Frijters  <address@hidden>

        * java/lang/Class.java
        (forName(String), forName(String,boolean,ClassLoader)): Added
call to
        VMClassLoader.registerInitiatingLoader.
        * java/lang/ClassLoader.java
        (defineClass(String,byte[],int,int,ProtectionDomain):
        Changed to call VMClassLoader.registerInitiatingLoader.
        * vm/reference/java/lang/VMClassLoader.java
        (findLoadedClass): Added synchronization.
        (registerInitiatingLoader): New method.

Attachment: ClassLoader.patch.txt
Description: ClassLoader.patch.txt

Attachment: findLoadedClass.java
Description: findLoadedClass.java


reply via email to

[Prev in Thread] Current Thread [Next in Thread]