Latest libgcj broken?

Matt Welsh
Thu Mar 16 21:13:00 GMT 2000

I remember seeing something on the list that the latest libgcj might be
broken with respect to gcc 2.95.2. Is that still true?

I am trying to get to the point where I can use the new bells and whistles
in libgcj (e.g., dynamic class loading). I am happy to use any version of
egcs/gcc which is known to work with newer versions of libgcj. So far I 
haven't found a combination that works.

I have built gcc-2.95.2 from scratch using Bryce's latest patch, as well
as libgcj out of CVS (both the latest version and rolled back a month ago).

Bryce -- what version of gcc and libgcj are you using? 

In each case, for the simplest "Hello world" test program, I get the 
following crash at program startup time, and the following stack trace.

Note that using gij works just fine, so it seems to have to do with 
running a compiled binary.

This bug (with calling notifyAll() from _Jv_PrepareCompiledClass) looks
*really* familiar; didn't we have a fix for something like this a while
time ago?

Thanks much -

Matt Welsh

% gcj -o Hello --main=Hello Hello.class
% ./Hello

$ gdb Hello
runGNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run
Starting program: /disks/now/grad/mdw/src/ninja/test/mdw/Hello 
[New Thread 13292 (manager thread)]
[New Thread 13284 (initial thread)]
[New Thread 13293]
[Switching to Thread 13293]

Program received signal SIGABRT, Aborted.
0x40261111 in __kill () from /lib/
(gdb) where
#0  0x40261111 in __kill () from /lib/
#1  0x40227f7b in raise (sig=6) at signals.c:63
#2  0x40262447 in abort () at ../sysdeps/generic/abort.c:88
#3  0x804944b in __default_terminate ()
#4  0x804946c in __terminate ()
#5  0x8049ea4 in throw_helper (eh=0x807d650, pc=0x4020def1, 
    my_udata=0xbf7ffb1c, offset_p=0xbf7ffb18)
#6  0x804a05f in __throw ()
#7  0x400add09 in Letext ()
    at /home/cs/mdw/disks/mm33/egcs-jaguar/src/libgcj-cvs/libjava/
#8  0x40136f79 in java::lang::Object::notifyAll (this=0x804c988)
    at /home/cs/mdw/disks/mm33/egcs-jaguar/src/libgcj-cvs/libjava/gcj/cni.h:116
#9  0x40134e1d in _Jv_PrepareCompiledClass (klass=0x804c988)
    at /home/cs/mdw/disks/mm33/egcs-jaguar/src/libgcj-cvs/libjava/java/lang/
#10 0x401334bb in java::lang::Class::initializeClass (this=0x804c988)
    at /home/cs/mdw/disks/mm33/egcs-jaguar/src/libgcj-cvs/libjava/java/lang/
#11 0x40153ad4 in _Jv_InitClass (klass=0x804c988)
    at /home/cs/mdw/disks/mm33/egcs-jaguar/src/libgcj-cvs/libjava/java/lang/Class.h:206
#12 0x804b11e in Hello::main ()
#13 0x40130277 in gnu::gcj::runtime::FirstThread::run (this=0x8063ea0)
    at /home/cs/mdw/disks/mm33/egcs-jaguar/src/libgcj-cvs/libjava/gnu/gcj/runtime/
#14 0x4013c122 in java::lang::Thread::run_ (obj=0x8063ea0)
    at /home/cs/mdw/disks/mm33/egcs-jaguar/src/libgcj-cvs/libjava/java/lang/
#15 0x4014d2b8 in really_start (x=0x805eed0)
    at /home/cs/mdw/disks/mm33/egcs-jaguar/src/libgcj-cvs/libjava/
#16 0x4020def2 in GC_start_routine (arg=0x8082fe0)
    at /home/cs/mdw/disks/mm33/egcs-jaguar/src/libgcj-cvs/boehm-gc/linux_threads.c:553
#17 0x40225ce9 in pthread_start_thread (arg=0xbf7ffe7c) at manager.c:204

More information about the Java mailing list