This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Re: Patch: add extensions directory contents to VMClassLoader class path.
Ranjit Mathew writes:
> On Fri, 18 Jun 2004 10:23:29 +0100, Andrew Haley <aph@redhat.com> wrote:
> >
> > Ranjit Mathew writes:
> > >
> > > Yes, that was the problem - if I just create a dummy
> > > $GCC_DIR/share/java/ext folder, the segfault disappears
> > > and it reappears if I delete this folder.
> > >
> > > If I just protect your code with a "dir.exists()", then
> > > things start working fine again.
> >
> > Yes, but this just papers over the real problem, which is why the
> > segfault wasn't caught.
>
> This is VMClassLoader.init() and if "dir" does not
> really exist, the returned "files[]" is null...
>
> Now if you see prims.cc:
> -------------------------------- 8< --------------------------------
> 983 // Once the bootstrap loader is in place, change it into a kind of
> 984 // system loader, by having it read the class path.
> 985 gnu::gcj::runtime::VMClassLoader::initialize();
> 986
> 987 INIT_SEGV;
> 988 #ifdef HANDLE_FPE
> 989 INIT_FPE;
> 990 #endif
> -------------------------------- 8< --------------------------------
>
> we're installing the SEGV handler only after the VMClassLoader
> has initialised. Hence the SEGV was not caught via the
> normal exception handling mechanism.
Ah, okay. Not a problem then.
Andrew.