This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

gcj program crashes, with small example


hi!


I already posted this mail to the gcc-help mailing list but I guess this 
one would have been the more appropriate. So I hope someone on this list 
might have a clue what I am doing wrong.
The problem is running vCreateJavaVM(NULL);
It seems it can't be run inside a thread?? In my example it runs inside 
an omniOrb thread but as far as I could see this is only a wrapper around
pthread. 

I now produced a very small example showing the crash.
The backtrace was:

[Switching to Thread 16386 (LWP 18107)]
0x40559247 in GC_push_all_eager () from /usr/lib/libgcj.so.4
(gdb) bt
#0  0x40559247 in GC_push_all_eager () from /usr/lib/libgcj.so.4
#1  0x405592c2 in GC_push_all_stack () from /usr/lib/libgcj.so.4
#2  0x40555776 in GC_push_all_stacks () from /usr/lib/libgcj.so.4
#3  0x4055bfd7 in GC_default_push_other_roots () from /usr/lib/libgcj.so.4
#4  0x4055a4a2 in GC_push_roots () from /usr/lib/libgcj.so.4
#5  0x40558056 in GC_mark_some () from /usr/lib/libgcj.so.4
#6  0x4054fbbe in GC_stopped_mark () from /usr/lib/libgcj.so.4
#7  0x4054f8b5 in GC_try_to_collect_inner () from /usr/lib/libgcj.so.4
#8  0x4055ad6d in GC_init_inner () from /usr/lib/libgcj.so.4
#9  0x4055aa0e in GC_init () from /usr/lib/libgcj.so.4
#10 0x40553ae9 in GC_init_gcj_malloc () from /usr/lib/libgcj.so.4
#11 0x4054d1e5 in _Jv_InitGC() () from /usr/lib/libgcj.so.4
#12 0x40361baa in _Jv_CreateJavaVM(void*) () from /usr/lib/libgcj.so.4
#13 0x08048df3 in JvCreateJavaVM (vm_args=0x0) at cni.h:125
#14 0x08048bf9 in testclass::testThread() (this=0x8049c98) at crashme.cpp:38
#15 0x08048bd5 in testclass::testThreadStartRoutine(void*) (data=0x8049c98) at crashme.cpp:27
#16 0x40037cca in omni_thread_wrapper () from /usr/lib/libomnithread.so.3
#17 0x408dcf60 in pthread_start_thread () from /lib/i686/libpthread.so.0
#18 0x408dd0fe in pthread_start_thread_event () from /lib/i686/libpthread.so.0
#19 0x40a17327 in clone () from /lib/i686/libc.so.6


The used software was:
  gcc (GCC) 3.3.1 (SuSE Linux)
  libomnithread.so.3 from omniORB-4.0.2-3


Hope this helps to finally find the problem!

Thanks Fabian

Attachment: crashme.cpp
Description: Text document

Attachment: Makefile
Description: Text document


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