crash loading gcj stuff
Marcus G. Daniels
mgd at swarm.org
Wed Feb 2 12:52:15 PST 2000
>>>>> "GB" == Godmar Back <gback at cs.utah.edu> writes:
GB> Or are you a "alpha test power user" who wants to help testing gcj
GB> support?
Yeah, I understand refinements are a long road.. But I must admit I'm greedy
to see how much difference gcj will make on the client-side of my things..
GB> If so, did you remember to run the fixup program in developers?
Yeah, incidentally, I had to exclude some symbols that matched a
pattern that fixup was looking for. They were of the form
"__*@@GLIBC_2.0". Another change was to include
<java/lang/reflect/Constructor.h> in gcj-class.cc and gcj-soft.cc.
GB> Could you give the gcc version (gcc -v), whether or not you have
GB> libgcj installed on your system (try locate libgcj), what
GB> libraries kaffe was linked against (try ldd ...../libexec/Kaffe)
I'm using GCC out of CVS as of yesterday (2.96 20000131), likewise for
libgcj. ldd on Kaffe reports libdl.so.2, libm.so.6, libc.so.6,
ld-linux.so.2, and libkaffevm-1.0.5.so.
GB> What is your CLASSPATH?
Just hello.so.
GB> Your LD_LIBRARY_PATH?
. (for the fixup) and /usr/X11R6/lib
GB> Your /etc/ld.so.conf?
/usr/X11R6/lib and /usr/i486-linux-libc5/lib
GB> How did you compile hello.so?
First compiled against the unpacked Klasses.jar and then linked with
"gcj -shared -o X.so X.o".
GB> Could you type "ldd hello.so" for me (this mustn't depend on
GB> libgcj.so!)
The previous link command ended up giving me libzgcj.so.0, libgcjgc.so.1,
and libgcj.so.1 as depedencies. With -nostdlib that goes away, but now I
get a different behavior:
mgd at hive[~] $ CLASSPATH=hello.so LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH KAFFE_DEBUG=gdb kaffe -vmdebug GCJ,GCJMORE hello
GNU gdb 20000117
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 "i586-pc-linux-gnu"...
(gdb) run
Starting program: /packages/libexec/Kaffe -vmdebug GCJ,GCJMORE hello
---------------------------------------------------------
Dumping fixup symbol table for module hello.so
CLASS @0x40099100, d1=Ljava/lang/Object;, d2=, d3=
CLASS @0x40099160, d1=Ljava/lang/System;, d2=, d3=
STATICFIELD @0x400991ac, d1=Ljava/lang/System;, d2=out, d3=
METHOD @0x400990c0, d1=Ljava/lang/Object;, d2=<init>, d3=()
VTABLE @0x400991c0, d1=Ljava/lang/Class;, d2=, d3=
METHOD @0x400990c8, d1=Ljava/lang/Object;, d2=clone, d3=()
METHOD @0x400990d0, d1=Ljava/lang/Object;, d2=equals, d3=(Ljava/lang/Object;)
METHOD @0x400990d8, d1=Ljava/lang/Object;, d2=finalize, d3=()
METHOD @0x400990e0, d1=Ljava/lang/Object;, d2=hashCode, d3=()
METHOD @0x400990e8, d1=Ljava/lang/Object;, d2=toString, d3=()
-------end of table for hello.so---
gcjLoadSharedObject: Loaded `hello.so'
getStaticFieldAddr: static field java/lang/System.out at 0x400991ac
Class `int'@0x40090000
accflags=0x0 superclass=@(nil)
size_in_bytes= 0 vtable_method_count= 0 method_count= 0
field_count= 0 static_field_count= 0 state= 0
interface_count= 0
Class `long'@0x40090060
accflags=0x0 superclass=@(nil)
size_in_bytes= 0 vtable_method_count= 0 method_count= 0
field_count= 0 static_field_count= 0 state= 0
interface_count= 0
Class `boolean'@0x400900c0
accflags=0x0 superclass=@(nil)
size_in_bytes= 0 vtable_method_count= 0 method_count= 0
field_count= 0 static_field_count= 0 state= 0
interface_count= 0
Class `char'@0x40090120
accflags=0x0 superclass=@(nil)
size_in_bytes= 0 vtable_method_count= 0 method_count= 0
field_count= 0 static_field_count= 0 state= 0
interface_count= 0
Class `float'@0x40090180
accflags=0x0 superclass=@(nil)
size_in_bytes= 0 vtable_method_count= 0 method_count= 0
field_count= 0 static_field_count= 0 state= 0
interface_count= 0
Class `double'@0x400901e0
accflags=0x0 superclass=@(nil)
size_in_bytes= 0 vtable_method_count= 0 method_count= 0
field_count= 0 static_field_count= 0 state= 0
interface_count= 0
Class `byte'@0x40090240
accflags=0x0 superclass=@(nil)
size_in_bytes= 0 vtable_method_count= 0 method_count= 0
field_count= 0 static_field_count= 0 state= 0
interface_count= 0
Class `short'@0x400902a0
accflags=0x0 superclass=@(nil)
size_in_bytes= 0 vtable_method_count= 0 method_count= 0
field_count= 0 static_field_count= 0 state= 0
interface_count= 0
Class `void'@0x40090300
accflags=0x0 superclass=@(nil)
size_in_bytes= 0 vtable_method_count= 0 method_count= 0
field_count= 0 static_field_count= 0 state= 0
interface_count= 0
invoking __throw: obj at 0x81f7220 class=`java/util/NoSuchElementException'
Program received signal SIGABRT, Aborted.
0x400da4e1 in __kill () from /lib/libc.so.6
(gdb) bt
#0 0x400da4e1 in __kill () from /lib/libc.so.6
#1 0x400da156 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x400db868 in abort () at ../sysdeps/generic/abort.c:88
#3 0x4006ee05 in get_reg_addr () at /src/kaffe/kaffe/kaffevm/gcj/eh.c:635
#4 0x4006eefc in next_stack_level (pc=0x4006d234, udata=0xbfffecac,
caller_udata=0xbfffec2c) at /src/kaffe/kaffe/kaffevm/gcj/eh.c:644
#5 0x4006f149 in throw_helper (eh=0x40090760, pc=0x4006d234,
my_udata=0xbfffed7c, offset_p=0xbfffed78)
at /src/kaffe/kaffe/kaffevm/gcj/eh.c:771
#6 0x4006f3b6 in __throw () at /src/kaffe/kaffe/kaffevm/gcj/eh.c:954
#7 0x4006d235 in _Jv_Throw (obj=0x81f7220)
at /src/kaffe/kaffe/kaffevm/gcj/gcj-except.c:179
#8 0x400327c1 in dispatchException (eobj=0x81f7220, baseframe=0x81e8bb8)
at /src/kaffe/kaffe/kaffevm/exception.c:381
#9 0x400325d1 in throwExternalException ()
at /src/kaffe/kaffe/kaffevm/exception.c:239
#10 0x4004af0e in soft_athrow () at /src/kaffe/kaffe/kaffevm/soft.c:445
#11 0x81f42d3 in ?? ()
#12 0x81b5445 in ?? ()
#13 0x8168a2a in ?? ()
#14 0x81a782e in ?? ()
#15 0x81c110b in ?? ()
#16 0x4004d778 in callMethodA (meth=0x81457e0, func=0x81473d0, obj=0x0,
args=0x0, ret=0xbfffefe4, promoted=1) at /src/kaffe/config/i386/common.h:38
#17 0x40028347 in processClass (class=0x81249c8, tostate=11, einfo=0xbffff33c)
at /src/kaffe/kaffe/kaffevm/classMethod.c:466
#18 0x4004b1c0 in soft_fixup_trampoline (_data=0x814717d)
at /src/kaffe/kaffe/kaffevm/soft.c:553
#19 0x4006a561 in i386_do_fixup_trampoline ()
at /src/kaffe/kaffe/kaffevm/jit3/machine.c:1013
#20 0x4004db60 in callMethodV (meth=0x81890b0, func=0x8185520, obj=0x817efb0,
args=0xbffff788, ret=0xbffff6e8) at /src/kaffe/config/i386/common.h:38
#21 0x4004cea7 in do_execute_java_method_v (obj=0x817efb0,
method_name=0x40078e32 "add",
signature=0x40078e1c "(Ljava/lang/Thread;)V", mb=0x0, isStaticCall=0,
argptr=0xbffff788) at /src/kaffe/kaffe/kaffevm/support.c:92
#22 0x4004cf33 in do_execute_java_method (obj=0x817efb0,
method_name=0x40078e32 "add",
signature=0x40078e1c "(Ljava/lang/Thread;)V", mb=0x0, isStaticCall=0)
at /src/kaffe/kaffe/kaffevm/support.c:106
#23 0x4004e6c6 in createInitialThread (nm=0x40078d92 "main")
at /src/kaffe/kaffe/kaffevm/thread.c:285
#24 0x4004e2da in initThreads () at /src/kaffe/kaffe/kaffevm/thread.c:111
#25 0x4002781e in initialiseKaffe ()
at /src/kaffe/kaffe/kaffevm/baseClasses.c:168
#26 0x4003aa75 in JNI_CreateJavaVM (vm=0x804b8b4, env=0x804b8b8,
args=0x804b860) at /src/kaffe/kaffe/kaffevm/jni.c:165
#27 0x8048c77 in main (argc=4, argv=0xbffff8d4)
at /src/kaffe/kaffe/kaffe/main.c:113
#28 0x400d41eb in __libc_start_main (main=0x8048b80 <main>, argc=4,
argv=0xbffff8d4, init=0x8048950 <_init>, fini=0x8049a1c <_fini>,
rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbffff8cc)
at ../sysdeps/generic/libc-start.c:90
(gdb) up 16
#16 0x4004d778 in callMethodA (meth=0x81457e0, func=0x81473d0, obj=0x0,
args=0x0, ret=0xbfffefe4, promoted=1) at /src/kaffe/config/i386/common.h:38
38 ((void (*)(void))(call->function))();
(gdb) x /s meth->name->data
0x8122100: "<clinit>"
(gdb) print *meth->class
$4 = {head = {dtable = 0x811ba08, lock = 0x0}, centry = 0x8138fd8,
name = 0x811b508, sourcefile = 0x8147148 "System.java", accflags = 49,
superclass = 0x81244c8, constants = {size = 210, tags = 0x813bb38 "",
data = 0x813b7f0}, methods = 0x8145010, nmethods = 26, msize = 5,
fields = 0x81412f0, bfsize = 8, nfields = 6, nsfields = 6,
dtable = 0x8146300, interfaces = 0x0, if2itable = 0x0, itable2dtable = 0x0,
interface_len = 0, total_interface_len = 0, implementors = 0x0,
impl_index = 1, loader = 0x0, gc_layout = 0x8120980, state = 9 '\t',
processingThread = 0x811a030, finalizer = 0x0, static_data = 0x8138e38,
gcjPeer = 0x0, live_count = 0}
(gdb)
More information about the kaffe
mailing list