This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


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

libgcj/1145: static linking yields circularity in Class.forName



>Number:         1145
>Category:       libgcj
>Synopsis:       static linking yields circularity in Class.forName
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    java-hacker
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:06:35 PST 2000
>Closed-Date:    
>Last-Modified:  Mon Jan 17 14:40:00 PST 2000
>Originator:     Tom Tromey
>Release:        current cvs
>Organization:
>Environment:

>Description:
With the addition of dynamic loading for classes
(and uncommenting of some classloader code), statically
linked gcj applications which use Class.forName will
encounter circularity problems.

The basic problem is that the default ClassLoader is
a URL ClassLoader, which itself uses Class.forName to
find the correct protocol handler.  Since forName tries
to create the system ClassLoader if it doesn't already
exist, and since with static linking the "file" URL
handler won't be linked in automatically (since nothing
explicitly references it), circularity results.

A workaround is to explicitly require the file URL
handler to be linked in (eg, using -u)
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR libgcj/136

Responsible-Changed-From-To: apbianco->java-hacker
Responsible-Changed-By: tromey
Responsible-Changed-When: Mon Jan 17 14:34:26 2000
Responsible-Changed-Why:
    I mis-categorized this when I submitted it.

From: tromey@cygnus.com
To: apbianco@cygnus.com, green@cygnus.com, java-gnats@sourceware.cygnus.com,
  tromey@cygnus.com
Cc:  
Subject: Re: libgcj/136
Date: 17 Jan 2000 22:34:26 -0000

 Synopsis: static linking yields circularity in Class.forName
 
 Responsible-Changed-From-To: apbianco->java-hacker
 Responsible-Changed-By: tromey
 Responsible-Changed-When: Mon Jan 17 14:34:26 2000
 Responsible-Changed-Why:
     I mis-categorized this when I submitted it.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=136&database=java
>Unformatted:



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