More Tru64 errors
The Morsbergers
morsberger@usa.net
Sat Dec 8 18:38:00 GMT 2001
I found something. I configured gcc without "--enable-threads=posix"
(because gc was within pthreads when it cored) and my test program works.
Now I can not create any threaded objects (see example below).
Does gcj support threaded java objects? If not, what is the issue and maybe
I can look into it.
class Test extends Thread
{
public void run()
{
for( int i=0; i < 10000; i++ )
System.out.println("Hello World, " + i);
}
public static void main (String[] args)
{
Test t = new Test();
t.start();
}
}
--
David Morsberger
> From: The Morsbergers <morsberger@usa.net>
> Date: 2001年12月08日 17:42:21 -0500
> To: Java GCC <java@gcc.gnu.org>
> Subject: More Tru64 errors
>> I finally got gcc / gcj to build. Now it is core dumping while in the gc. I
> have been telling friends / manager about the potential of gcj and I have not
> been able to demonstrate it.
>> Any ideas?
>> program:
> class Test
> {
>> public void run()
> {
> for( int i=0; i < 100; i++ )
> System.out.println("Hello World, " + i);
> }
> public static void main (String[] args)
> {
> Test t = new Test();
> t.run();
>> }
> }
>> command:
> gcj --main=Test --encoding=UTF-8 Test.java -o Test
> gcj --version
> 3.0.3
>> more config.status
> ../configure
> --with-gcc-version-trigger=/home/dwmorsb/gcc/gcc_branch/gcc/version.c
> --host=alphaev6-dec-osf4.0g --prefix=/home/dwmors
> b/gcc/gcc_branch/bin --enable-shared --enable-libgcj --enable-threads=posix
> --enable-languages=c,c++,java --norecursion
>> Test
> Hello World, 0
> Hello World, 1
> ...
> Hello World, 62
> Stack overflow: pid 31223, proc Test, addr 0x140161b68, pc 0x30000815508
> Memory fault(coredump)
>> gdb:
> gdb Test core
> GNU gdb 5.0
> This GDB was configured as "alphaev6-dec-osf4.0g"...
> Core was generated by `Test'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from
> /home/dwmorsb/gcc/gcc_branch/bin/lib/libgcc_s.so.1...done.
> Reading symbols from /home/dwmorsb/gcc/gcc_branch/bin/lib/libgcj.so...done.
> Reading symbols from /usr/shlib/libm.so...done.
> Reading symbols from /usr/shlib/libiconv.so...done.
> Reading symbols from /home/dwmorsb/gcc/gcc_branch/bin/lib/libgcjgc.so...done.
> Reading symbols from /usr/shlib/libpthread.so...done.
> Reading symbols from /home/dwmorsb/gcc/gcc_branch/bin/lib/libzgcj.so...done.
> Reading symbols from /usr/shlib/libc.so...done.
> Reading symbols from /usr/shlib/libexc.so...done.
> #0 0x30000815508 in GC_clear_stack_inner (arg=0x140153450 "020円. @",
> limit=5370098776) at ../../../boehm-gc/misc.c:247
> 247 {
> (gdb) where
> #0 0x30000815508 in GC_clear_stack_inner (arg=0x140153450 "020円. @",
> limit=5370098776) at ../../../boehm-gc/misc.c:247
> #1 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #2 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #3 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #4 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #5 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #6 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #7 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #8 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #9 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #10 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #11 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #12 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #13 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #14 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #15 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #16 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #17 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #18 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #19 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #20 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #21 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #22 0x30000815554 in GC_clear_stack_inner (arg=0x14013df90 "",
> limit=4831836416) at ../../../boehm-gc/misc.c:252
> #23 0x300008156d4 in GC_clear_stack (arg=0x14013df90 "") at
> ../../../boehm-gc/misc.c:311
> #24 0x3000080ee9c in GC_gcj_malloc (lb=78,
> ptr_to_struct_containing_descr=0x300401d2248) at
> ../../../boehm-gc/gcj_mlc.c:131
> #25 0x300001ff58c in _Z12_Jv_AllocObjiPN4java4lang5ClassE (size=1075044240,
> klass=0x11ffff900) at ../../../libjava/boehm.cc:340
> #26 0x30000206ed8 in _Jv_NewPrimArray (eltype=0x300401d1e30, count=29) at
> ../../../libjava/prims.cc:442
> #27 0x3000024d4cc in _ZN4java4lang12StringBufferC1EPNS0_6StringE
> (this=0x140132618, str=0x1401181c0)
> at ../../../libjava/java/lang/StringBuffer.java:616
> #28 0x120002604 in _ZN4Test3runEv (this=0x140131fe0) at Test.java:7
> #29 0x120002730 in _ZN4Test4mainEP6JArrayIPN4java4lang6StringEE
> (args=0x140000118) at Test.java:12
> #30 0x30000225300 in _ZN3gnu3gcj7runtime11FirstThread3runEv (this=0x1400cdec0)
> at ../../../libjava/gnu/gcj/runtime/natFirstThread.cc:153
> #31 0x300002357b0 in _ZN4java4lang6Thread4run_EPNS0_6ObjectE (obj=0x14013df90)
> at ../../../libjava/java/lang/natThread.cc:276
> #32 0x30000200418 in _Z12really_startPv (x=0x1400b7e50) at
> ../../../libjava/posix-threads.cc:349
> #33 0x3ff805a58b0 in __thdBase () from /usr/shlib/libpthread.so
>> --
> David Morsberger
More information about the Java
mailing list