This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: FYI: loading a class twice




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]