This is the mail archive of the java-discuss@sourceware.cygnus.com 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: Exceptions: the "gij bug"


Anthony Green wrote:

> I blame the current broken scheme used to manage libgcc.a.
>
> $ cat E.java
> import java.io.*;
>
> public class E
> {
>   public static void main (String[] args) throws Exception
>     {
>       throw new IOException();
>     }
> }
>
> $ gcj -o E --main=E E.java
> $ nm E | grep __throw
> $ ./E
> Aborted
> $ gcj -o E --main=E E.java -Wl,-u,__throw
> $ nm E | grep __throw
> 0804a760 T __throw
> 08049670 T __throw_type_match
> $ ./E
> java.io.IOException
>
> libgcc should really be a system wide shared library.
>
> The runtime linker is bringing parts of libgcc in from different
> shared libraries.  What's happening in the end is that the various
> libgcc objects that end up linked together are not internally
> consistant with one another.
>
> Here's my proposed `fix' (although I've omitted the rebuilt configure
> script) .  Let me know if this works for you...

Cool - that definitely seems to have been the problem. The fix seems to work for
me!

regards

  [ bryce ]



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