This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: classloading from so
- From: Tom Tromey <tromey at redhat dot com>
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Cc: Lars Andersen <lars at rimfaxe dot com>, java at gcc dot gnu dot org
- Date: 25 Sep 2002 13:49:59 -0600
- Subject: Re: classloading from so
- References: <75A9FEBA25015040A761C1F74975667D400B5A@hplex4.hpl.hp.com>
- Reply-to: tromey at redhat dot com
>>>>> "Hans" == Boehm, Hans <hans_boehm@hp.com> writes:
Hans> Hopefully the class loader is referenced from a static variable
Hans> in the loaded library? Thus this can never happen because the
Hans> garbage collector views the library static data as roots and
Hans> would thus never collect the class loader?
That's a good point, which I hadn't considered.
For a class loaded by SharedLibLoader we could register the `loader'
field as a disappearing link. Would that work correctly?
Hans> I say "hopefully" because I'm pretty sure we have no mechanism
Hans> to test whether a static method of some class is still on a call
Hans> stack somewhere. Thus if we could unload such classes, we could
Hans> probably unload them while the code is still running, which
Hans> would be a bug, not to mention security hole.
Also a good point. There has to be a way to fix this though.
Tom