This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: FYI: loading a class twice
- To: minyard at acm dot org
- Subject: Re: Patch: FYI: loading a class twice
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Fri, 7 Sep 2001 17:11:06 -0400 (EDT)
- cc: tromey at redhat dot com, Java Patch List <java-patches at gcc dot gnu dot org>
On 6 Sep 2001 minyard@acm.org wrote:
> But I still don't think it's a good idea to silently use the first
> version of a class in the load order.
Let me try to be clear. I think an attempt to load two identical classes
(equal pointers) can be safely ignored.
However an attempt to load two different classes with the same name can
lead to problems. In this case I would consider it acceptable to print a
message and abort.
The first scenario is much more likely on ELF targets. Even symbols in
the .jcr section of an object will be resolved by searching all libraries
in order. However that behavior is certainly platform dependent.
If I understand the patch correctly, we only check the former, not the
latter. The latter is more dangerous IMO.
Jeff