This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug libgcj/27658] New: _Jv_CreateJavaVM calling ExtensionClassLoader bootstrap problem


_Jv_CreateJavaVM calls the following code:
  // Set up the system class loader and the bootstrap class loader.
  gnu::gcj::runtime::ExtensionClassLoader::initialize();

ExtensionClassLoader extends URLClassLoader and calls addURLs() on it which
might trigger loading of lots of jar files, this in turn can trigger loading
security providers when the jar files are signed which in turn can trigger
initialization of the logging framework which might in turn try to load user
classes.

At this time not everything has been setup yet. Thread.currentThread() for
example will return null if called by any of the above code.

This is a real problem with the latest classpath 0.91 import for which we need
a LogManager override now:

    // GCJ LOCAL
    // Unfortunately this can be called during bootstrap when
    // Thread.currentThread() will return null.
    // See bug #
    Thread t = Thread.currentThread();
    ClassLoader loader = (t == null) ? null : t.getContextClassLoader();


-- 
           Summary: _Jv_CreateJavaVM calling ExtensionClassLoader bootstrap
                    problem
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mark at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27658


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